Skip to content

PR: pyflakes nit2: Remove as e#610

Merged
lieryan merged 3 commits intopython-rope:masterfrom
edreamleo:ekr-pyflakes-nit2
Dec 16, 2022
Merged

PR: pyflakes nit2: Remove as e#610
lieryan merged 3 commits intopython-rope:masterfrom
edreamleo:ekr-pyflakes-nit2

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 lieryan enabled auto-merge December 16, 2022 15:10
@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.

2 participants