Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: pyflakes nit2: Remove as e #610

Merged
merged 3 commits into from Dec 16, 2022
Merged

PR: pyflakes nit2: Remove as e #610

merged 3 commits into from Dec 16, 2022

Conversation

edreamleo
Copy link
Contributor

@edreamleo edreamleo commented Dec 16, 2022

We all know the pattern:

except SomeException as e:
    ...

In this case, however, e isn't used. The existing code adds a # noqa comment, but there is no way to turn off the pyflakes complaint:

patchedast.py:925:9: local variable 'e' is assigned to but never used

Imo, there is no need to fussily add the as e: # noqa.

@lieryan I'll be happy to add any comment you like just below the changed line.

@lieryan
Copy link
Member

lieryan commented Dec 16, 2022

Looks fine to me, there's no need for extra comment here.

@edreamleo
Copy link
Contributor Author

@lieryan Thanks!

@lieryan lieryan merged commit dc982b2 into python-rope:master Dec 16, 2022
@edreamleo edreamleo changed the title PR: Remove a pyflakes nit and a flake8 suppression PR: pyflakes nit2: Remove as e Dec 16, 2022
@edreamleo edreamleo deleted the ekr-pyflakes-nit2 branch December 16, 2022 15:36
@lieryan lieryan added this to the 1.7.0 milestone Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants