Skip to content

Commit d9dcd7e

Browse files
committed
Add pylint configurations
1 parent 9ed2448 commit d9dcd7e

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

cmd2_myplugin/pylintrc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# pylint configuration
3+
#
4+
# $ pylint --rcfile=cmd2_myplugin/pylintrc cmd2_myplugin
5+
#
6+
7+
[messages control]
8+
# too-few-public-methods pylint expects a class to have at
9+
# least two public methods
10+
disable=too-few-public-methods

tests/pylintrc

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# pylint configuration for tests package
3+
#
4+
# $ pylint --rcfile=tests/pylintrc tests
5+
#
6+
7+
[basic]
8+
# allow for longer method and function names
9+
method-rgx=(([a-z][a-z0-9_]{2,50})|(_[a-z0-9_]*))$
10+
function-rgx=(([a-z][a-z0-9_]{2,50})|(_[a-z0-9_]*))$
11+
12+
[messages control]
13+
# too-many-public-methods -> test classes can have lots of methods, so let's ignore those
14+
# missing-docstring -> prefer method names instead of docstrings
15+
# no-self-use -> test methods part of a class hardly ever use self
16+
# unused-variable -> sometimes we are expecting exceptions
17+
# redefined-outer-name -> pylint fixtures cause these
18+
# protected-access -> we want to test private methods
19+
disable=too-many-public-methods,missing-docstring,no-self-use,unused-variable,redefined-outer-name,protected-access

0 commit comments

Comments
 (0)