root/masterdriverz/use-expand/dev-notes/pylintrc @ marienz%2540gentoo.org-20061012220139-62173dc4676746e8

Revision marienz%2540gentoo.org-20061012220139-62173dc4676746e8, 3.2 kB (checked in by Marien Zwart <marienz@…>, 2 years ago)

Tweak the pylint plugin.

Line 
1# First cut at a pylintrc to match pkgcore's coding style.
2#
3# Use like "pylint --rcfile=dev-notes/pylintrc pkgcore".
4#
5# This is currently only tested with pylint 0.11.0. Generally using
6# the latest ~arch pylint in portage is recommended.
7#
8# This version was written by marienz, which means it is probably not
9# accurate.
10
11# Yes, section names are case-sensitive.
12[master]
13
14load-plugins=pkgcore_lint
15
16
17[MASTER]
18
19# Ignore external modules.
20ignore=demandload.py,bundled_elementtree.py,native_readdir.py
21
22
23[REPORTS]
24
25# Disable a bunch of silly checkers.
26#
27# To add to this list run pylint with --include-ids=y so you can see
28# what id the message you want to disable has. To disable a message
29# temporarily pass --disable-msg=id1,id2 (useful for things like
30# docstrings (C0111)).
31
32# * or ** magic: W0142
33# unused argument: W0613
34# too many ancestors: R0901
35# not enough pub methods: R0903
36# too many pub methods: R0904
37# method could be a function: R0201
38# mention what is locally disabled (I0011)
39# abstract method not overridden: W0223
40# Metaclass should have "mcs" as first argument (we use "cls", string
41# is hardcoded): C0203
42# Except doesn't do anything (just "pass" in an except clause): W0704
43# Missing docstring: C0111
44# Too many return statements: R0911
45# Too many branches: R0912
46# Too many local variables: R0914
47# Too many statements: R0915
48# Abstract class not referenced: R0921
49# Abstract class only referenced n times: R0922
50disable-msg=W0142,W0613,R0901,R0903,R0904,R0201,I0011,W0223,C0203,W0704,C0111,R0911,R0912,R0914,R0915,R0921,R0922
51
52[MESSAGES CONTROL]
53# Newer pylints use this one. Keep both locations in sync for now.
54disable-msg=W0142,W0613,R0901,R0903,R0904,R0201,I0011,W0223,C0203,W0704,C0111,R0911,R0912,R0914,R0915,R0921,R0922
55
56[BASIC]
57
58# Required attributes for module, separated by a comma. Was __revision__.
59required-attributes=
60
61# Regular expression which should only match functions or classes name which do
62# not require a docstring. Was __.*__
63no-docstring-rgx=^_
64
65# Regular expression which should only match correct module level names
66# was:    (([A-Z_][A-Z1-9_]*)|(__.*__))$
67const-rgx=(([A-Z_][A-Z1-9_]*)|([a-z_][a-z1-9_]*))$
68
69# Regular expression which should only match correct class names
70# TODO make this stricter
71# was:    [A-Z_][a-zA-Z0-9]+$
72class-rgx=([A-Z_][a-zA-Z0-9]+|[a-z_][a-z0-9_]+)$
73
74# Regular expression which should only match correct instance attribute names
75# Was:   [a-z_][a-z0-9_]{2,30}$
76attr-rgx=[a-z_][a-z0-9_]{1,30}$
77
78# Regular expression which should only match correct argument names
79# Was:       [a-z_][a-z0-9_]{2,30}$
80argument-rgx=([a-z_][a-z0-9_]{2,30}|a|kw)$
81
82# Regular expression which should only match correct variable names
83# Was:       [a-z_][a-z0-9_]{2,30}$
84variable-rgx=[a-z_][a-z0-9_]{0,30}$
85
86# Good variable names which should always be accepted, separated by a comma
87# Was:     d,e,i,j,ex,_
88good-names=d,e,i,j,ex,_,setUp,tearDown,force_True,force_False,f
89
90# "bad" builtins.
91# Was: map,filter,apply,input
92bad-functions=filter,apply,input
93
94[VARIABLES]
95
96# A regular expression matching names used for dummy variables (i.e. not used)
97# (common use case is unused loop counter variable).
98# Was:              _|dummy
99dummy-variables-rgx=_|dummy|i
100
101
102[DESIGN]
103
104# Maximum number of arguments for function / method
105# Was: 6
106max-args=12
Note: See TracBrowser for help on using the browser.