Repository navigation
Conversation
|
@branchvincent any specific reason to reopen same change when there is already #3988 ? |
hey @kamyar! your pr is for poetry while this is for poetry-core |
|
Sorry missed that 🤦 😞 |
| constraints = self.pretty_constraint.split(",") | ||
| constraints = [parse_constraint(c) for c in constraints] | ||
| constraints = [str(c) for c in constraints] | ||
| requirement += " ({})".format(",".join(constraints)) |
There was a problem hiding this comment.
| requirement += " ({})".format(",".join(constraints)) | |
| requirement += f" ({','.join(constraints)})" |
| requirement += " (=={})".format(self.constraint.text) | ||
| requirement += f" (=={self.constraint.text})" | ||
| elif not self.constraint.is_any(): | ||
| requirement += " ({})".format(str(self.constraint).replace(" ", "")) |
There was a problem hiding this comment.
| requirement += " ({})".format(str(self.constraint).replace(" ", "")) | |
| requirement += f' ({str(self.constraint).replace(" ", "")})' |
| if len(markers) > 1: | ||
| markers = ["({})".format(m) for m in markers] | ||
| markers = [f"({m})" for m in markers] | ||
| requirement += "; {}".format(" and ".join(markers)) |
There was a problem hiding this comment.
| requirement += "; {}".format(" and ".join(markers)) | |
| requirement += f"; {' and '.join(markers)}" |
| @@ -123,7 +123,7 @@ def base_pep_508_name(self) -> str: | |||
| requirement += "[{}]".format(",".join(self.extras)) | |||
There was a problem hiding this comment.
| requirement += "[{}]".format(",".join(self.extras)) | |
| requirement += f"[{','.join(self.extras)}]" |
| @@ -108,7 +108,7 @@ def base_pep_508_name(self) -> str: | |||
| requirement += "[{}]".format(",".join(self.extras)) | |||
There was a problem hiding this comment.
| requirement += "[{}]".format(",".join(self.extras)) | |
| requirement += f"[{','.join(self.extras)}]" |
| @@ -48,7 +48,7 @@ def base_pep_508_name(self) -> str: | |||
| if self.extras: | |||
| requirement += "[{}]".format(",".join(self.extras)) | |||
There was a problem hiding this comment.
| requirement += "[{}]".format(",".join(self.extras)) | |
| requirement += f"[{','.join(self.extras)}]" |
| @@ -108,7 +108,7 @@ def base_pep_508_name(self) -> str: | |||
| requirement += "[{}]".format(",".join(self.extras)) | |||
There was a problem hiding this comment.
| requirement += "[{}]".format(",".join(self.extras)) | |
| requirement += f"[{','.join(self.extras)}]" |
| requirement += " @ {}+{}@{}".format(self._vcs, self._source, self.reference) | ||
| requirement += f" @ {self._vcs}+{self._source}@{self.reference}" | ||
| else: | ||
| requirement += " @ {}+ssh://{}@{}".format( |
There was a problem hiding this comment.
It missing to apply the f-string on line 113.
| version_string = f"{self.epoch}!{version_string}" | ||
|
|
||
| if self.local: | ||
| version_string += "+{}".format(".".join(map(str, self.local))) |
There was a problem hiding this comment.
| version_string += "+{}".format(".".join(map(str, self.local))) | |
| version_string += f"+{'.'.join(map(str, self.local))}" |
|
|
||
| if self.extras: | ||
| parts.append("[{0}]".format(",".join(sorted(self.extras)))) | ||
| parts.append("[{}]".format(",".join(sorted(self.extras)))) |
There was a problem hiding this comment.
| parts.append("[{}]".format(",".join(sorted(self.extras)))) | |
| parts.append(f"[{','.join(sorted(self.extras))}]") |
|
closing in favor of #230 |
Relates-to: python-poetry/poetry#3860
In the same spirit as python-poetry/poetry#3988, this:
pyupgrade --py36-plusto the codebase.pre-commit-config.yaml