Repository navigation
Conversation
In Python 3 there will be even more than Python 2. Each __undefined name__ has the possibility of raising _NameError_ at runtime.
|
Very much +1 for fixing these (cc @josef-pkt). |
| # stop the build if there are Python syntax errors or undefined names | ||
| - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics | ||
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
| - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
There was a problem hiding this comment.
How strong is your preference for 127 over 80?
There was a problem hiding this comment.
Flake8 default is 79... I ususally bang my code through Black which autoformats to 88 characters. I usually bump it up to the width of the GitHub editor (127) when testing a new repo to not clog up the error reports. We can set it to max-line-length=80 if that is the standard for statsmodels.
| - pip install flake8 | ||
| - echo -n "flake8 testing of ${URL} on " ; python -V | ||
| # stop the build if there are Python syntax errors or undefined names | ||
| - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics |
There was a problem hiding this comment.
Could some of this go in a setup.cfg file? That's the direction we should be moving in medium-term anyway.
| - python setup.py build_ext --inplace | ||
| - python setup.py develop | ||
|
|
||
| before_script: |
There was a problem hiding this comment.
Can this whole thing go into something like a lint.sh file? I'd like to be able to a) run it locally and b) make it increasingly strict over time as incremental cleanup occurs.
There was a problem hiding this comment.
Sure that is doable.
|
Closing... @jbrockmendel if you want to add flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics somewhere else in the testing process, please try to do so in a different pull request but the stats are getting worse... flake8 testing of https://github.com/statsmodels/statsmodels on Python 3.7.0 |
How come? This is a great idea. |
|
I know that you have the knowledge to put this test in the right place in the process and the passion to see it done correctly and it gets updated as progress is made. You can do it. If you get stuck, then ping me. It should be run once on Python 2 and once on Python 3 because they produce different results. |
In Python 3 there will be even more than Python 2.
Each undefined name has the possibility of raising NameError at runtime.