Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fslpy
Commits
e3f7b6ba
Commit
e3f7b6ba
authored
7 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Document pylint usage
parent
621a5b8b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/contributing.rst
+21
-0
21 additions, 0 deletions
doc/contributing.rst
with
21 additions
and
0 deletions
doc/contributing.rst
+
21
−
0
View file @
e3f7b6ba
...
@@ -123,3 +123,24 @@ for a list of error codes):
...
@@ -123,3 +123,24 @@ for a list of error codes):
- E302: expected 2 blank lines, found 0
- E302: expected 2 blank lines, found 0
- E303: too many blank lines (3)
- E303: too many blank lines (3)
- E701: multiple statements on one line (colon)
- E701: multiple statements on one line (colon)
The ``pylint`` tool checks many of the same things as ``flake8`,` and can be
*very* opinionated about other things. So I disable all refactoring and
convention messages, and a few select warnings (type ``pylint --list-msgs``
for a full list of codes):
- W0511 (``fixme``): Warn about ``TODO`` and ``FIXME`` comments
- W0703 (``broad-except``): Warn about too-general ``except`` blocks (e.g.
``except Exception:``)
- W1202 (``logging-format-interpolation``): Warn about using ``format``
when calling a log function, instead of using ``%`` string formatting.
To check code with ``flake8`` and ``pylint``, I use the following commands::
flake8 --ignore=E127,E201,E203,E221,E222,E241,E271,E272,E301,E302,E303,E701 fsl
pylint --extension-pkg-whitelist=numpy,wx \
--generated-members=np.int8,np.uint8,np.int16,np.uint16,np.int32,np.uint32,np.int64,np.uint64,np.float32,np.float64,np.float128,wx.PyDeadObjectError \
--disable=R,C,W0511,W0703,W1202 fsl
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment