Repository navigation
Conversation
b2034d6 to
7e4d02a
Compare
Co-authored-by: Kamyar Ghasemlou <github@kamy.me> Co-authored-by: Harry Peach <harrypeach1999@gmail.com>
25de732 to
6f34b77
Compare
Co-authored-by: Kamyar Ghasemlou <github@kamy.me> Co-authored-by: Harry Peach <harrypeach1999@gmail.com>
Co-authored-by: Kamyar Ghasemlou <github@kamy.me> Co-authored-by: Harry Peach <harrypeach1999@gmail.com>
|
worth also removing in this pull request? |
|
@danieleades I don't have context on how to improve that but happy to help, do you have any suggestions? |
My suggestion is to remove the try/except entirely. If the comment is to be believed, it's only required for python 3.5, which isn't supported anyway |
|
Sounds good, will give it a try by replacing the try/except with |
Co-authored-by: Kamyar Ghasemlou <github@kamy.me> Co-authored-by: Harry Peach <harrypeach1999@gmail.com>
|
@abn can you take a look and allow the workflow runs? :) |
|
|
||
| try: | ||
| r = urlopen(url + "{}".format(checksum)) | ||
| r = urlopen(url + f"{checksum}") |
There was a problem hiding this comment.
Couldn't this concatenation be like that?
| r = urlopen(url + f"{checksum}") | |
| r = urlopen(f"{url}{checksum}") |
|
|
||
| try: | ||
| r = urlopen(url + "{}".format(name)) | ||
| r = urlopen(url + f"{name}") |
There was a problem hiding this comment.
Here too
| r = urlopen(url + f"{name}") | |
| r = urlopen(f"{url}{name}") |
| self.line(f"{self.poetry.package.pretty_version}") | ||
| else: | ||
| self.line( | ||
| "<comment>{}</> <info>{}</>".format( |
There was a problem hiding this comment.
It's necessary to change this excerpt.
| base_name = "poetry-{}-{}".format(__version__, sys.platform) | ||
| name = "{}.tar.gz".format(base_name) | ||
| base_name = f"poetry-{__version__}-{sys.platform}" | ||
| name = f"{base_name}.tar.gz" |
There was a problem hiding this comment.
How about unifying this string into one?
Obs.: if you accept, don't forget to change the lines that use the string name
| name = f"{base_name}.tar.gz" | |
| base_name = f"poetry-{__version__}-{sys.platform}.tar.gz" |
| expected = "Deleted virtualenv: {}\n".format( | ||
| (venv_cache / "{}-py3.6".format(venv_name)) | ||
| ) | ||
| expected = "Deleted virtualenv: {}\n".format(venv_cache / f"{venv_name}-py3.6") |
There was a problem hiding this comment.
| expected = "Deleted virtualenv: {}\n".format(venv_cache / f"{venv_name}-py3.6") | |
| expected = f"Deleted virtualenv: {venv_cache / venv_name}-py3.6\n" |
|
is this pull request still alive? |
I hope so, would be nice to get the code merged as it seems ready. @abn Is there anything that needs changing on this before the workflows can be run? Would be happy to contribute some more to get this over the line |
|
I'm closing this in favor of #4758 as it uses the current pre-commit structure, skips files that should not be altered by pyupgrade ( Thank you for the work on these PRs! I've incorporated the changes from review into my version, and given credit where due. Please submit more PRs cleaning out old code/cruft when you can! |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hey, I saw the issue linked below and immediately thought of pyupgrade and as poetry already uses pre-commit added the config for it with target set to python 3.6.
I know the issue says "please keep the pull requests small and modular." but as the changes are autogenerated and rather simple(in terms of mental focus needed to review) I thought might be ok to submit them together.
Please let me know if multiple small PRs is still preferred, I will open related syntax updates together (either by file/directory or by type of change)
I already went through all changes twice and did not notice anything that would change the behaviour.
Also please let me know if there is something missing.
p.s. thank you for such a great tool, it has been a true delight to use it both at work and personal project. :)
p.p.s. below are some suggested extra changes that convert
f"{foo}"tofoo, if they look good I will create a single commit with the fixes rather than creating one commit per suggestion.Pull Request Check List
Resolves: #3860