root/releases/pkgcore/0.1.1/dev-notes/pylintrc @ marienz%2540gentoo.org-20060907140411-a5f0dfc17a6e7223

Revision marienz%2540gentoo.org-20060907140411-a5f0dfc17a6e7223, 3.1 KB (checked in by Marien Zwart <marienz@…>, 2 years ago)

Allow attributes with a name of length 2.

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
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# operator not preceded by a space (broken in python 2.4): C0322
41# Metaclass should have "mcs" as first argument (we use "cls", string
42# is hardcoded): C0203
43# Except doesn't do anything (just "pass" in an except clause): W0704
44# Missing docstring: C0111
45# Too many return statements: R0911
46# Too many branches: R0912
47# Too many local variables: R0914
48# Too many statements: R0915
49# Abstract class not referenced: R0921
50# Abstract class only referenced n times: R0922
51disable-msg=W0142,W0613,R0901,R0903,R0904,R0201,I0011,W0223,C0322,C0203,W0704,C0111,R0911,R0912,R0914,R0915,R0921,R0922
52
53[BASIC]
54
55# Required attributes for module, separated by a comma. Was __revision__.
56required-attributes=
57
58# Regular expression which should only match functions or classes name which do
59# not require a docstring. Was __.*__
60no-docstring-rgx=^_
61
62# Regular expression which should only match correct module level names
63# was:    (([A-Z_][A-Z1-9_]*)|(__.*__))$
64const-rgx=(([A-Z_][A-Z1-9_]*)|([a-z_][a-z1-9_]*))$
65
66# Regular expression which should only match correct class names
67# TODO make this stricter
68# was:    [A-Z_][a-zA-Z0-9]+$
69class-rgx=([A-Z_][a-zA-Z0-9]+|[a-z_][a-z0-9_]+)$
70
71# Regular expression which should only match correct instance attribute names
72# Was:   [a-z_][a-z0-9_]{2,30}$
73attr-rgx=[a-z_][a-z0-9_]{1,30}$
74
75# Regular expression which should only match correct argument names
76# Was:       [a-z_][a-z0-9_]{2,30}$
77argument-rgx=([a-z_][a-z0-9_]{2,30}|a|kw)$
78
79# Regular expression which should only match correct variable names
80# Was:       [a-z_][a-z0-9_]{2,30}$
81variable-rgx=[a-z_][a-z0-9_]{0,30}$
82
83# Good variable names which should always be accepted, separated by a comma
84# Was:     d,e,i,j,ex,_
85good-names=d,e,i,j,ex,_,setUp,tearDown,force_True,force_False,f
86
87# "bad" builtins.
88# Was: map,filter,apply,input
89bad-functions=filter,apply,input
90
91[VARIABLES]
92
93# A regular expression matching names used for dummy variables (i.e. not used)
94# (common use case is unused loop counter variable).
95# Was:              _|dummy
96dummy-variables-rgx=_|dummy|i
97
98
99[DESIGN]
100
101# Maximum number of arguments for function / method
102# Was: 6
103max-args=12
Note: See TracBrowser for help on using the browser.