Comments (2)
I usually do it in two passes like this:
# 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
The first pass halts the build on error but the second just treats "style violations" as warnings.
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. This PR should therefore recommend a flake8 run of these tests on the entire codebase.
- 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
from gluon-nlp.
Thanks. I believe we should enforce E901,E999,F821,F822,F823
on the CI. I have enabled the check for them following your suggestion in #213 (subject to review).
I would be happy to also enforce style related issues (once they are all fixed or selectively disabled), but let's see what others think.
from gluon-nlp.
Related Issues (20)
- Upgrade sacremoses to 0.0.44
- Loading 'distilbert_6_768_12' is broken HOT 2
- Operator npx.broadcast_like HOT 3
- [v0.x] Some CPU tests fail after switching to use MXNet 1.8.0 HOT 1
- Dead link to build_steps.groovy in contribute.rst#make-changes
- difference between gluonnlp 0.10.0 and gluonnlp 1.0.0 RoBERTaModel?
- Badge link was broken in README
- GPT2 tests mysteriously killed HOT 3
- gluon-nlp/scripts/question_answering/train.py HOT 2
- XLMR Conversion fails on parameter dictionary KeyError HOT 3
- I want BigRNN back... HOT 5
- Difference in naming convention between op.py and test_op.py
- Implementation of Incremental Decoding
- Wrong ETA for max_seq_length != 512
- Wheel fails to build setup.py for gluonnlp HOT 2
- (not a bug) question about bert `create_pretraining_data.tokenize_lines()` HOT 1
- ImportError [...]/lib/python3.10/site-packages/gluonnlp/data/fast_bert_tokenizer.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send HOT 5
- Problems not being imported from colab HOT 1
- nlp version error HOT 1
- Installation Error in google Collab env with Python3.7 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gluon-nlp.