forked from hustlei/QssStylesheetEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pylintrc
184 lines (135 loc) · 4.92 KB
/
.pylintrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
[MASTER]
init-hook='base_dir="QssStylesheetEditor"; import sys,os,re; _re=re.search(r".+[\\\/]" + base_dir, os.getcwd()); project_dir = _re.group() if _re else os.path.join(os.getcwd(), base_dir); sys.path.append(project_dir); sys.path.append(project_dir+"/src")'
extension-pkg-whitelist=PyQt5,
sip,
pytest
ignore=.git, dist, build, bak, toml, splash.py
ignore-patterns=.*(_[vV][0-9.\-_]+[.]py$$|[.]old[.]py$$|_bak[.]py$|_rc[.]py$)
jobs=0
load-plugins=pylint.extensions.bad_builtin, # deprecated_builtins,
pylint.extensions.check_elif,
#pylint.extensions.docparams,
pylint.extensions.docstyle,
pylint.extensions.emptystring,
pylint.extensions.comparetozero,
pylint.extensions.mccabe, # design checker, for finding complexity issues
pylint.extensions.overlapping_exceptions,
# pylint.extensions.redefined_variable_type # Multiple Types checker
persistent=yes
#rcfile=
suggestion-mode=yes
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=yes
[TYPECHECK]
ignored-modules = PyQt5, sip, chardet
ignored-classes = PyQt5, sip, chardet
# http://www.itkeyword.com/doc/7378082288593243x373/how-do-i-get-pylint-to-recognize-numpy-members
[MESSAGES CONTROL]
disable= import-outside-toplevel, # some module need import inside function
broad-except, # Catching too general exception, such as: Exception
no-self-use, # method didn't used 'self' param, change to static function is ugly too
missing-function-docstring, # add later
missing-docstring, # for pylint 2.4 didn't support missing-function-docstring
unused-import, # improve later
; unused-argument, # override must have unused-argument
; unnecessary-lambda, # dialog.show must use lambda
eval-used,
; bad-continuation, # not equal to pep8
; unsubscriptable-object, #error when you use pyqt#
; redefined-variable-type, # base class type as function param will cause err
# enable=c-extension-no-member
[REPORTS]
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
output-format=text
reports=no
score=yes
[REFACTORING]
max-nested-blocks=5
never-returning-functions=sys.exit
[BASIC]
; ignore='^_.*'
; exempt="^_.*"
module-naming-style=snake_case
# module-rgx=<regex>
class-naming-style=PascalCase
# class-rgx=<regex>
# class-attribute-naming-style=camelCase
# camel Pascal, can begin with _ or __
class-attribute-rgx=(_{0,2}[a-zA-Z][a-zA-Z0-9]{2,}_*)$
# method-naming-style=camelCase
# camel snake, can begin with _ or __
method-rgx=(_{0,2}[a-z][a-z0-9_]+|_{0,2}[a-z]+[a-zA-Z0-9]+)$
# attr-naming-style=camelCase
# camel can begin with _ or __
attr-rgx=(([a-z_][a-zA-Z0-9]{2,})|(__[a-z][a-zA-Z0-9_]+))$
# function-naming-style=snake_case
# camel snake, can begin with _ or __
function-rgx=(_{0,2}[a-z][a-z0-9_]+|_{0,2}[a-z]+[a-zA-Z0-9]+)$
# (?:(?P<snake>_{0,2}[a-z][a-z0-9_]+)|(?P<camel>_{0,2}[a-z]+[a-zA-Z0-9]+))$
argument-naming-style=camelCase
# argument-rgx=<regex>
# all var in module(such as all vars in __name__=="__main__") are treated as const
const-naming-style= any #UPPER_CASE
# const-rgx=<regex>
variable-naming-style=any
# variable-rgx=<regex>
inlinevar-naming-style=any
# inlinevar-rgx=<regex>
property-classes=abc.abstractproperty
good-names=i,
j,
k,
l,
m,
n,
x,
y,
z,
e,
ex,
Run,
_
include-naming-hint=no # if warning, hint a correct name
docstring-min-length=-1
[FORMAT]
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# indent-after-paren=4
# indent-string=' '
max-line-length=120
# max-module-lines=1000
; no-space-check=trailing-comma,
; dict-separator
single-line-if-stmt=yes
[MISCELLANEOUS]
notes=FIXME,
XXX,
TODO
[SIMILARITIES]
ignore-comments=yes
ignore-docstrings=yes
ignore-imports=no
min-similarity-lines=4
[VARIABLES]
allow-global-unused-variables=yes
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
ignored-argument-names=_.*|^ignored_|^unused_|.*Event$|event
# whether check for unused import in __init__ files.
init-import = no
[DESIGN]
max-args=16 # 8
max-locals=45 # 15
; max-returns=6
; max-branches=12
max-statements=300 # 50
; max-parents=7
max-attributes=28 # 7
min-public-methods=1 # 2
max-public-methods=40 # 20
max-bool-expr=10 #5
max-complexity=15 #12
[IMPORTS]
allow-any-import-level=yes
# Force import order to recognize a module as part of a third party library.
known-third-party=enchant, PyQt5, sip
allow-wildcard-with-all=yes