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

support context managers that suppress exceptions #496

Merged
merged 9 commits into from
Mar 10, 2022

Conversation

nbdaaron
Copy link
Contributor

@nbdaaron nbdaaron commented Mar 9, 2022

No description provided.

@nbdaaron nbdaaron marked this pull request as draft March 9, 2022 02:26
pyanalyze/name_check_visitor.py Outdated Show resolved Hide resolved
pyanalyze/name_check_visitor.py Outdated Show resolved Hide resolved
pyanalyze/name_check_visitor.py Outdated Show resolved Hide resolved
pyanalyze/test_name_check_visitor.py Show resolved Hide resolved
@nbdaaron nbdaaron marked this pull request as ready for review March 9, 2022 21:51
pyanalyze/name_check_visitor.py Outdated Show resolved Hide resolved
pyanalyze/name_check_visitor.py Outdated Show resolved Hide resolved
pyanalyze/name_check_visitor.py Outdated Show resolved Hide resolved
hauntsaninja pushed a commit to python/typeshed that referenced this pull request Mar 10, 2022
For context we found this from quora/pyanalyze#496, which makes pyanalyze stricter about context managers that may swallow exceptions. tempfile._TemporaryFileWrapper.__exit__ returns whatever its underlying file returns (https://github.com/python/cpython/blob/3.6/Lib/tempfile.py#L502), and file objects don't tend to return anything from __exit__.
@JelleZijlstra
Copy link
Contributor

hm there is a new self check false positive

@JelleZijlstra JelleZijlstra merged commit 5aeab3a into quora:master Mar 10, 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