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

Undefined name: 'result' in mapping.py #145

Closed
wants to merge 1 commit into from

Conversation

cclauss
Copy link

@cclauss cclauss commented Apr 22, 2019

flake8 testing of https://github.com/dask/gcsfs on Python 3.7.1

$ flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics

./gcsfs/mapping.py:70:16: F821 undefined name 'result'
        return result
               ^
./gcsfs/dask_link.py:115:28: F821 undefined name 'maxdepth'
                        if maxdepth is None or maxdepth > 1:
                           ^
./gcsfs/dask_link.py:115:48: F821 undefined name 'maxdepth'
                        if maxdepth is None or maxdepth > 1:
                                               ^
3     F821 undefined name 'maxdepth'
3

E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.

  • F821: undefined name name
  • F822: undefined name name in __all__
  • F823: local variable name referenced before assignment
  • E901: SyntaxError or IndentationError
  • E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree

[flake8](http://flake8.pycqa.org) testing of https://github.com/dask/gcsfs on Python 3.7.1

$ __flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics__
```
./gcsfs/mapping.py:70:16: F821 undefined name 'result'
        return result
               ^
./gcsfs/dask_link.py:115:28: F821 undefined name 'maxdepth'
                        if maxdepth is None or maxdepth > 1:
                           ^
./gcsfs/dask_link.py:115:48: F821 undefined name 'maxdepth'
                        if maxdepth is None or maxdepth > 1:
                                               ^
3     F821 undefined name 'maxdepth'
3
```
__E901,E999,F821,F822,F823__ are the "_showstopper_" [flake8](http://flake8.pycqa.org) issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.
* F821: undefined name `name`
* F822: undefined name `name` in `__all__`
* F823: local variable name referenced before assignment
* E901: SyntaxError or IndentationError
* E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree
martindurant added a commit that referenced this pull request Apr 22, 2019
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

1 participant