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: Update pypy, Add flake8 tests #74

Merged
merged 3 commits into from
Sep 13, 2018
Merged

Conversation

cclauss
Copy link

@cclauss cclauss commented Sep 12, 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

cclauss added 3 commits September 12, 2018 10:01
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
@mwouts
Copy link
Owner

mwouts commented Sep 12, 2018

Thanks @cclauss . I like this. But we need to implement #73 first, i.e. add an (un)escape_help_call at places where (un)escape_magic is called (and only for Python and Julia cells, R is fine with quotation mark).

@cclauss
Copy link
Author

cclauss commented Sep 12, 2018

Why are Python 3.6 and 3.7 failing the Travis tests?

@mwouts mwouts merged commit 04af62c into mwouts:master Sep 13, 2018
@cclauss cclauss deleted the patch-1 branch September 13, 2018 04:20
@mwouts
Copy link
Owner

mwouts commented Sep 13, 2018

They were failing because

  1. the ?next line came from a notebook (the file was created by test_mirror...). We had to first change the mapping of cell text to scripts (Comment Jupyter help calls in Python and Julia scripts #73) first.
  2. local install of jupytext was required for testing, as one of the test calls the nbconvert exporters that the package also provides.

Now everything seems alright, thanks @cclauss for your pull request !

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