1
- # Based on:
2
- # https://github.com/kpreid/shinysdr/blob/master/pylintrc
1
+ # Based on https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/ci_build/pylintrc
3
2
4
3
[MASTER]
5
- # XXX should be changed to your project folder
6
- # see http://stackoverflow.com/a/37238692/3828891 for explanation
7
- init-hook =' base_dir="epsagon"; 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)'
4
+
5
+ # Profiled execution.
6
+ profile =no
7
+
8
+ # Don't pickle collected data for later comparisons.
9
+ persistent =no
10
+
11
+ # List of plugins (as comma separated values of python modules names) to load,
12
+ # usually to register additional checkers.
13
+ load-plugins =pylint_quotes
14
+
8
15
9
16
[MESSAGES CONTROL]
10
- # Find available symbolic names in:
11
- # https://docs.pylint.org/features.html
12
- disable =duplicate-code,too-few-public-methods,too-many-arguments,fixme,too-many-instance-attributes,bad-continuation,useless-object-inheritance
17
+
18
+ disable =duplicate-code,too-few-public-methods,too-many-arguments,fixme,too-many-instance-attributes,bad-continuation,too-many-locals,logging-format-interpolation,too-many-branches,useless-object-inheritance,assignment-from-no-return,useless-import-alias
19
+
20
+ # Ignore no member when source is unavailable
21
+ extension-pkg-whitelist =ujson
22
+
23
+ [REPORT]
24
+
25
+ msg-template =' {abspath}:{line}: [{msg_id}({symbol}) {obj}] {msg}'
26
+
27
+ output-format =parseable
28
+
29
+ # Tells whether to display a full report or only the messages
30
+ reports =no
31
+
32
+ # Python expression which should return a note less than 10 (10 is the highest
33
+ # note). You have access to the variables errors warning, statement which
34
+ # respectively contain the number of errors / warnings messages and the total
35
+ # number of statements analyzed. This is used by the global evaluation report
36
+ # (RP0004).
37
+ evaluation =10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
38
+
39
+ # Add a comment according to your evaluation note. This is used by the global
40
+ # evaluation report (RP0004).
41
+ comment =no
42
+
43
+
44
+ [BASIC]
45
+
46
+ # Required attributes for module, separated by a comma
47
+ required-attributes =
48
+
49
+ # List of builtins function names that should not be used, separated by a comma
50
+ bad-functions =apply,input,reduce
51
+
52
+ # Regular expression which should only match correct module names
53
+ module-rgx =(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
54
+
55
+ # Regular expression which should only match correct module level names
56
+ const-rgx =^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
57
+
58
+ # Regular expression which should only match correct class names
59
+ class-rgx =^_?[A-Z][a-zA-Z0-9]*$
60
+
61
+ # Regular expression which should only match correct function names
62
+ function-rgx =^(?:(?P<camel_case>_?[A-Z][a-zA-Z0-9]*)|(?P<snake_case>_?[a-z][a-z0-9_]*))$
63
+
64
+ # Regular expression which should only match correct method names
65
+ method-rgx =^(?:(?P<exempt>__[a-z0-9_]+__|next)|(?P<camel_case>_{0,2}[A-Z][a-zA-Z0-9]*)|(?P<snake_case>_{0,2}[a-z][a-z0-9_]*))$
66
+
67
+ # Regular expression which should only match correct instance attribute names
68
+ attr-rgx =^_{0,2}[a-z][a-z0-9_]*$
69
+
70
+ # Regular expression which should only match correct argument names
71
+ argument-rgx =^[_a-z][a-z0-9_]*$
72
+
73
+ # Regular expression which should only match correct variable names
74
+ variable-rgx =^[a-z][a-z0-9_]*$
75
+
76
+ # Regular expression which should only match correct attribute names in class
77
+ # bodies
78
+ class-attribute-rgx =^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
79
+
80
+ # Regular expression which should only match correct list comprehension /
81
+ # generator expression variable names
82
+ inlinevar-rgx =^[a-z][a-z0-9_]*$
83
+
84
+ # Good variable names which should always be accepted, separated by a comma
85
+ good-names =main,_
86
+
87
+ # Regular expression which should only match function or class names that do
88
+ # not require a docstring.
89
+ no-docstring-rgx =(__.*__|main)
90
+
91
+ # Minimum line length for functions/classes that require docstrings, shorter
92
+ # ones are exempt.
93
+ docstring-min-length =10
94
+
13
95
14
96
[FORMAT]
15
97
# Maximum number of characters on a single line.
16
98
max-line-length =80
17
99
100
+
18
101
# Maximum number of lines in a module
19
- max-module-lines =500
102
+ max-module-lines =500
103
+
104
+ # Allow the body of an if to be on the same line as the test if there is no
105
+ # else.
106
+ single-line-if-stmt =y
107
+
108
+ # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
109
+ # tab).
110
+ indent-string =' '
111
+
112
+ # Set the linting for string quotes
113
+ string-quote =single
114
+ triple-quote =double
115
+ docstring-quote =double
116
+
117
+
118
+ [TOKENS]
119
+
120
+ # Number of spaces of indent required when the last token on the preceding line
121
+ # is an open (, [, or {.
122
+ indent-after-paren =4
0 commit comments