X Tutup
The Wayback Machine - https://web.archive.org/web/20200910071521/https://github.com/trekhleb/learn-python/pull/5
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

Travis CI: Add flake8 to the testing #5

Merged
merged 7 commits into from Sep 13, 2018
Merged

Conversation

@cclauss
Copy link
Contributor

cclauss commented Sep 6, 2018

Add flake8 tests to find Python syntax errors and undefined names.

E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. Most other flake8 issues 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

learn-python should not teach the antipattern of bare exceptions.

cclauss added 6 commits Sep 6, 2018
cclauss
Add [flake8](http://flake8.pycqa.org) tests to find Python syntax errors and undefined names.

__E901,E999,F821,F822,F823__ are the "_showstopper_" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. Most other flake8 issues 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
cclauss
cclauss
cclauss
cclauss
cclauss
@trekhleb trekhleb changed the base branch from master to pyflakes8 Sep 13, 2018
@trekhleb
Copy link
Owner

trekhleb commented Sep 13, 2018

@cclauss thank you for PR!

@trekhleb trekhleb merged commit 45a36d3 into trekhleb:pyflakes8 Sep 13, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@cclauss cclauss deleted the cclauss:patch-1 branch Sep 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.
X Tutup