Fixes for flake8 master#4213
Merged
asottile merged 1 commit intopytest-dev:masterfrom Oct 23, 2018
asottile:flake8_master_fixes
Merged
Fixes for flake8 master#4213asottile merged 1 commit intopytest-dev:masterfrom asottile:flake8_master_fixes
asottile merged 1 commit intopytest-dev:masterfrom
asottile:flake8_master_fixes
Conversation
asottile
commented
Oct 22, 2018
| except Exception as e: | ||
| pass | ||
| except Exception as exc: | ||
| e = exc |
Member
Author
There was a problem hiding this comment.
@RonnyPfannschmidt this one is subtle, and a new python3 behaviour:
exc = 'hi'
try:
raise AssertionError('hello')
except Exception as exc:
pass
print(exc)$ python2 t.py
hello
$ python3 t.py
Traceback (most recent call last):
File "t.py", line 6, in <module>
print(exc)
NameError: name 'exc' is not defined
Member
There was a problem hiding this comment.
fabulous work, thanks for digging
Contributor
There was a problem hiding this comment.
So why was the assert e is not None below not causing a problem before? (since e should have been deleted)
Contributor
There was a problem hiding this comment.
Ah, likely untested code - i.e. it returned instead of going there I assume.
Member
Author
There was a problem hiding this comment.
Retry code that was never hit 🤷♂️
RonnyPfannschmidt
approved these changes
Oct 22, 2018
nicoddemus
approved these changes
Oct 22, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm prepping the 3.6.0 flake8 release, figured I'd try some larger codebases :)