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 names: 'sampling' and '_required' #13

Closed
cclauss opened this issue Apr 27, 2019 · 3 comments
Closed

Undefined names: 'sampling' and '_required' #13

cclauss opened this issue Apr 27, 2019 · 3 comments

Comments

@cclauss
Copy link
Contributor

cclauss commented Apr 27, 2019

flake8 testing of https://github.com/google/ffn on Python 3.7.1

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

./ffn/inference/resegmentation_analysis.py:256:7: F821 undefined name 'sampling'
      sampling, result.eval.from_a)
      ^
./ffn/inference/resegmentation_analysis.py:259:7: F821 undefined name 'sampling'
      sampling, result.eval.from_b)
      ^
./ffn/utils/bounding_box.py:374:17: F821 undefined name '_required'
          yield _required(self.start_to_box((x, y, z)))
                ^
./ffn/utils/bounding_box.py:395:11: F821 undefined name '_required'
          _required(self.index_to_sub_box(i)) for i in range(i_begin, i_end))
          ^
4     F821 undefined name 'sampling'
4

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
@griffbad
Copy link

griffbad commented Aug 6, 2019

Hey, did you ever solve this issue? I'm having the same issue with '_required' not being defined. Thanks!

@cclauss
Copy link
Contributor Author

cclauss commented Aug 6, 2019

Nope.

@mjanusz
Copy link
Collaborator

mjanusz commented Oct 24, 2019

Just pushed a fix, sorry about that!

@mjanusz mjanusz closed this as completed Oct 24, 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

No branches or pull requests

3 participants