You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Variables assigned from contextmanager are not detected as local variables.
To Reproduce
run
from contextlib import contextmanager
from mr_proper.main import check_file
@contextmanager
def foo():
yield "foobar"
def main():
with foo() as f:
return f
if __name__ == "__main__":
check_file(__file__, recursive=True)
This gives the ouput
foo is pure!
main is not pure because of:
it uses external name (f)
Expected behavior
main should be detected a pure
The text was updated successfully, but these errors were encountered:
Describe the bug
Variables assigned from contextmanager are not detected as local variables.
To Reproduce
run
This gives the ouput
Expected behavior
main should be detected a pure
The text was updated successfully, but these errors were encountered: