##// END OF EJS Templates
pylintrc: string isn't deprecated, only some of its methods
Benoit Boissinot -
r10403:b8acd325 default
parent child Browse files
Show More
@@ -1,313 +1,313 b''
1 # lint Python modules using external checkers.
1 # lint Python modules using external checkers.
2 #
2 #
3 # This is the main checker controlling the other ones and the reports
3 # This is the main checker controlling the other ones and the reports
4 # generation. It is itself both a raw checker and an astng checker in order
4 # generation. It is itself both a raw checker and an astng checker in order
5 # to:
5 # to:
6 # * handle message activation / deactivation at the module level
6 # * handle message activation / deactivation at the module level
7 # * handle some basic but necessary stats'data (number of classes, methods...)
7 # * handle some basic but necessary stats'data (number of classes, methods...)
8 #
8 #
9 [MASTER]
9 [MASTER]
10
10
11 # Specify a configuration file.
11 # Specify a configuration file.
12 #rcfile=
12 #rcfile=
13
13
14 # Python code to execute, usually for sys.path manipulation such as
14 # Python code to execute, usually for sys.path manipulation such as
15 # pygtk.require().
15 # pygtk.require().
16 #init-hook=
16 #init-hook=
17
17
18 # Profiled execution.
18 # Profiled execution.
19 profile=no
19 profile=no
20
20
21 # Add <file or directory> to the black list. It should be a base name, not a
21 # Add <file or directory> to the black list. It should be a base name, not a
22 # path. You may set this option multiple times.
22 # path. You may set this option multiple times.
23 ignore=CVS
23 ignore=CVS
24
24
25 # Pickle collected data for later comparisons.
25 # Pickle collected data for later comparisons.
26 persistent=yes
26 persistent=yes
27
27
28 # Set the cache size for astng objects.
28 # Set the cache size for astng objects.
29 cache-size=500
29 cache-size=500
30
30
31 # List of plugins (as comma separated values of python modules names) to load,
31 # List of plugins (as comma separated values of python modules names) to load,
32 # usually to register additional checkers.
32 # usually to register additional checkers.
33 load-plugins=
33 load-plugins=
34
34
35
35
36 [MESSAGES CONTROL]
36 [MESSAGES CONTROL]
37
37
38 # Enable only checker(s) with the given id(s). This option conflicts with the
38 # Enable only checker(s) with the given id(s). This option conflicts with the
39 # disable-checker option
39 # disable-checker option
40 #enable-checker=
40 #enable-checker=
41
41
42 # Enable all checker(s) except those with the given id(s). This option
42 # Enable all checker(s) except those with the given id(s). This option
43 # conflicts with the enable-checker option
43 # conflicts with the enable-checker option
44 #disable-checker=
44 #disable-checker=
45
45
46 # Enable all messages in the listed categories (IRCWEF).
46 # Enable all messages in the listed categories (IRCWEF).
47 #enable-msg-cat=
47 #enable-msg-cat=
48
48
49 # Disable all messages in the listed categories (IRCWEF).
49 # Disable all messages in the listed categories (IRCWEF).
50 disable-msg-cat=I
50 disable-msg-cat=I
51
51
52 # Enable the message(s) with the given id(s).
52 # Enable the message(s) with the given id(s).
53 #enable-msg=
53 #enable-msg=
54
54
55 # Disable the message(s) with the given id(s).
55 # Disable the message(s) with the given id(s).
56 # W0704: except: pass
56 # W0704: except: pass
57 # C0111: missing docstring
57 # C0111: missing docstring
58 # W0403: for the time being absolute imports don't play nice with demandimport
58 # W0403: for the time being absolute imports don't play nice with demandimport
59 disable-msg=W0704,C0111,W0403
59 disable-msg=W0704,C0111,W0403
60
60
61
61
62 [REPORTS]
62 [REPORTS]
63
63
64 # Set the output format. Available formats are text, parseable, colorized, msvs
64 # Set the output format. Available formats are text, parseable, colorized, msvs
65 # (visual studio) and html
65 # (visual studio) and html
66 output-format=text
66 output-format=text
67
67
68 # Include message's id in output
68 # Include message's id in output
69 include-ids=yes
69 include-ids=yes
70
70
71 # Put messages in a separate file for each module / package specified on the
71 # Put messages in a separate file for each module / package specified on the
72 # command line instead of printing them on stdout. Reports (if any) will be
72 # command line instead of printing them on stdout. Reports (if any) will be
73 # written in a file name "pylint_global.[txt|html]".
73 # written in a file name "pylint_global.[txt|html]".
74 files-output=no
74 files-output=no
75
75
76 # Tells whether to display a full report or only the messages
76 # Tells whether to display a full report or only the messages
77 reports=yes
77 reports=yes
78
78
79 # Python expression which should return a note less than 10 (10 is the highest
79 # Python expression which should return a note less than 10 (10 is the highest
80 # note). You have access to the variables errors warning, statement which
80 # note). You have access to the variables errors warning, statement which
81 # respectively contain the number of errors / warnings messages and the total
81 # respectively contain the number of errors / warnings messages and the total
82 # number of statements analyzed. This is used by the global evaluation report
82 # number of statements analyzed. This is used by the global evaluation report
83 # (R0004).
83 # (R0004).
84 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
84 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
85
85
86 # Add a comment according to your evaluation note. This is used by the global
86 # Add a comment according to your evaluation note. This is used by the global
87 # evaluation report (R0004).
87 # evaluation report (R0004).
88 comment=no
88 comment=no
89
89
90 # Enable the report(s) with the given id(s).
90 # Enable the report(s) with the given id(s).
91 #enable-report=
91 #enable-report=
92
92
93 # Disable the report(s) with the given id(s).
93 # Disable the report(s) with the given id(s).
94 #disable-report=
94 #disable-report=
95
95
96
96
97 # try to find bugs in the code using type inference
97 # try to find bugs in the code using type inference
98 #
98 #
99 [TYPECHECK]
99 [TYPECHECK]
100
100
101 # Tells whether missing members accessed in mixin class should be ignored. A
101 # Tells whether missing members accessed in mixin class should be ignored. A
102 # mixin class is detected if its name ends with "mixin" (case insensitive).
102 # mixin class is detected if its name ends with "mixin" (case insensitive).
103 ignore-mixin-members=yes
103 ignore-mixin-members=yes
104
104
105 # List of classes names for which member attributes should not be checked
105 # List of classes names for which member attributes should not be checked
106 # (useful for classes with attributes dynamically set).
106 # (useful for classes with attributes dynamically set).
107 ignored-classes=SQLObject
107 ignored-classes=SQLObject
108
108
109 # When zope mode is activated, add a predefined set of Zope acquired attributes
109 # When zope mode is activated, add a predefined set of Zope acquired attributes
110 # to generated-members.
110 # to generated-members.
111 zope=no
111 zope=no
112
112
113 # List of members which are set dynamically and missed by pylint inference
113 # List of members which are set dynamically and missed by pylint inference
114 # system, and so shouldn't trigger E0201 when accessed.
114 # system, and so shouldn't trigger E0201 when accessed.
115 generated-members=REQUEST,acl_users,aq_parent
115 generated-members=REQUEST,acl_users,aq_parent
116
116
117
117
118 # checks for
118 # checks for
119 # * unused variables / imports
119 # * unused variables / imports
120 # * undefined variables
120 # * undefined variables
121 # * redefinition of variable from builtins or from an outer scope
121 # * redefinition of variable from builtins or from an outer scope
122 # * use of variable before assignment
122 # * use of variable before assignment
123 #
123 #
124 [VARIABLES]
124 [VARIABLES]
125
125
126 # Tells whether we should check for unused import in __init__ files.
126 # Tells whether we should check for unused import in __init__ files.
127 init-import=yes
127 init-import=yes
128
128
129 # A regular expression matching names used for dummy variables (i.e. not used).
129 # A regular expression matching names used for dummy variables (i.e. not used).
130 dummy-variables-rgx=dummy
130 dummy-variables-rgx=dummy
131
131
132 # List of additional names supposed to be defined in builtins. Remember that
132 # List of additional names supposed to be defined in builtins. Remember that
133 # you should avoid to define new builtins when possible.
133 # you should avoid to define new builtins when possible.
134 additional-builtins=
134 additional-builtins=
135
135
136
136
137 # checks for :
137 # checks for :
138 # * doc strings
138 # * doc strings
139 # * modules / classes / functions / methods / arguments / variables name
139 # * modules / classes / functions / methods / arguments / variables name
140 # * number of arguments, local variables, branches, returns and statements in
140 # * number of arguments, local variables, branches, returns and statements in
141 # functions, methods
141 # functions, methods
142 # * required module attributes
142 # * required module attributes
143 # * dangerous default values as arguments
143 # * dangerous default values as arguments
144 # * redefinition of function / method / class
144 # * redefinition of function / method / class
145 # * uses of the global statement
145 # * uses of the global statement
146 #
146 #
147 [BASIC]
147 [BASIC]
148
148
149 # Required attributes for module, separated by a comma
149 # Required attributes for module, separated by a comma
150 required-attributes=
150 required-attributes=
151
151
152 # Regular expression which should only match functions or classes name which do
152 # Regular expression which should only match functions or classes name which do
153 # not require a docstring
153 # not require a docstring
154 no-docstring-rgx=__.*__
154 no-docstring-rgx=__.*__
155
155
156 # Regular expression which should only match correct module names
156 # Regular expression which should only match correct module names
157 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
157 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
158
158
159 # Regular expression which should only match correct module level names
159 # Regular expression which should only match correct module level names
160 const-rgx=(([a-zA-Z_][a-zA-Z0-9_]*)|(__.*__))$
160 const-rgx=(([a-zA-Z_][a-zA-Z0-9_]*)|(__.*__))$
161
161
162 # Regular expression which should only match correct class names
162 # Regular expression which should only match correct class names
163 class-rgx=[a-zA-Z_][a-zA-Z0-9]+$
163 class-rgx=[a-zA-Z_][a-zA-Z0-9]+$
164
164
165 # Regular expression which should only match correct function names
165 # Regular expression which should only match correct function names
166 function-rgx=[a-z_][a-z0-9_]{2,30}$
166 function-rgx=[a-z_][a-z0-9_]{2,30}$
167
167
168 # Regular expression which should only match correct method names
168 # Regular expression which should only match correct method names
169 method-rgx=[a-z_][a-z0-9_]{2,30}$
169 method-rgx=[a-z_][a-z0-9_]{2,30}$
170
170
171 # Regular expression which should only match correct instance attribute names
171 # Regular expression which should only match correct instance attribute names
172 attr-rgx=[a-z_][a-z0-9_]{1,30}$
172 attr-rgx=[a-z_][a-z0-9_]{1,30}$
173
173
174 # Regular expression which should only match correct argument names
174 # Regular expression which should only match correct argument names
175 argument-rgx=[a-z_][a-z0-9_]{0,30}$
175 argument-rgx=[a-z_][a-z0-9_]{0,30}$
176
176
177 # Regular expression which should only match correct variable names
177 # Regular expression which should only match correct variable names
178 variable-rgx=[a-z_][a-z0-9_]{0,30}$
178 variable-rgx=[a-z_][a-z0-9_]{0,30}$
179
179
180 # Regular expression which should only match correct list comprehension /
180 # Regular expression which should only match correct list comprehension /
181 # generator expression variable names
181 # generator expression variable names
182 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
182 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
183
183
184 # Good variable names which should always be accepted, separated by a comma
184 # Good variable names which should always be accepted, separated by a comma
185 good-names=i,j,k,ex,Run,_,ui,c,fn,f,fd,l
185 good-names=i,j,k,ex,Run,_,ui,c,fn,f,fd,l
186
186
187 # Bad variable names which should always be refused, separated by a comma
187 # Bad variable names which should always be refused, separated by a comma
188 bad-names=foo,bar,baz,toto,tutu,tata
188 bad-names=foo,bar,baz,toto,tutu,tata
189
189
190 # List of builtins function names that should not be used, separated by a comma
190 # List of builtins function names that should not be used, separated by a comma
191 #bad-functions=map,filter,apply,input
191 #bad-functions=map,filter,apply,input
192 bad-functions=map,filter,apply,input
192 bad-functions=map,filter,apply,input
193
193
194
194
195 # checks for
195 # checks for
196 # * external modules dependencies
196 # * external modules dependencies
197 # * relative / wildcard imports
197 # * relative / wildcard imports
198 # * cyclic imports
198 # * cyclic imports
199 # * uses of deprecated modules
199 # * uses of deprecated modules
200 #
200 #
201 [IMPORTS]
201 [IMPORTS]
202
202
203 # Deprecated modules which should not be used, separated by a comma
203 # Deprecated modules which should not be used, separated by a comma
204 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
204 deprecated-modules=regsub,TERMIOS,Bastion,rexec
205
205
206 # Create a graph of every (i.e. internal and external) dependencies in the
206 # Create a graph of every (i.e. internal and external) dependencies in the
207 # given file (report R0402 must not be disabled)
207 # given file (report R0402 must not be disabled)
208 import-graph=
208 import-graph=
209
209
210 # Create a graph of external dependencies in the given file (report R0402 must
210 # Create a graph of external dependencies in the given file (report R0402 must
211 # not be disabled)
211 # not be disabled)
212 ext-import-graph=
212 ext-import-graph=
213
213
214 # Create a graph of internal dependencies in the given file (report R0402 must
214 # Create a graph of internal dependencies in the given file (report R0402 must
215 # not be disabled)
215 # not be disabled)
216 int-import-graph=
216 int-import-graph=
217
217
218
218
219 # checks for sign of poor/misdesign:
219 # checks for sign of poor/misdesign:
220 # * number of methods, attributes, local variables...
220 # * number of methods, attributes, local variables...
221 # * size, complexity of functions, methods
221 # * size, complexity of functions, methods
222 #
222 #
223 [DESIGN]
223 [DESIGN]
224
224
225 # Maximum number of arguments for function / method
225 # Maximum number of arguments for function / method
226 max-args=5
226 max-args=5
227
227
228 # Maximum number of locals for function / method body
228 # Maximum number of locals for function / method body
229 max-locals=15
229 max-locals=15
230
230
231 # Maximum number of return / yield for function / method body
231 # Maximum number of return / yield for function / method body
232 max-returns=6
232 max-returns=6
233
233
234 # Maximum number of branch for function / method body
234 # Maximum number of branch for function / method body
235 max-branchs=12
235 max-branchs=12
236
236
237 # Maximum number of statements in function / method body
237 # Maximum number of statements in function / method body
238 max-statements=50
238 max-statements=50
239
239
240 # Maximum number of parents for a class (see R0901).
240 # Maximum number of parents for a class (see R0901).
241 max-parents=7
241 max-parents=7
242
242
243 # Maximum number of attributes for a class (see R0902).
243 # Maximum number of attributes for a class (see R0902).
244 max-attributes=7
244 max-attributes=7
245
245
246 # Minimum number of public methods for a class (see R0903).
246 # Minimum number of public methods for a class (see R0903).
247 min-public-methods=2
247 min-public-methods=2
248
248
249 # Maximum number of public methods for a class (see R0904).
249 # Maximum number of public methods for a class (see R0904).
250 max-public-methods=20
250 max-public-methods=20
251
251
252
252
253 # checks for :
253 # checks for :
254 # * methods without self as first argument
254 # * methods without self as first argument
255 # * overridden methods signature
255 # * overridden methods signature
256 # * access only to existent members via self
256 # * access only to existent members via self
257 # * attributes not defined in the __init__ method
257 # * attributes not defined in the __init__ method
258 # * supported interfaces implementation
258 # * supported interfaces implementation
259 # * unreachable code
259 # * unreachable code
260 #
260 #
261 [CLASSES]
261 [CLASSES]
262
262
263 # List of interface methods to ignore, separated by a comma. This is used for
263 # List of interface methods to ignore, separated by a comma. This is used for
264 # instance to not check methods defines in Zope's Interface base class.
264 # instance to not check methods defines in Zope's Interface base class.
265 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
265 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
266
266
267 # List of method names used to declare (i.e. assign) instance attributes.
267 # List of method names used to declare (i.e. assign) instance attributes.
268 defining-attr-methods=__init__,__new__,setUp
268 defining-attr-methods=__init__,__new__,setUp
269
269
270
270
271 # checks for :
271 # checks for :
272 # * unauthorized constructions
272 # * unauthorized constructions
273 # * strict indentation
273 # * strict indentation
274 # * line length
274 # * line length
275 # * use of <> instead of !=
275 # * use of <> instead of !=
276 #
276 #
277 [FORMAT]
277 [FORMAT]
278
278
279 # Maximum number of characters on a single line.
279 # Maximum number of characters on a single line.
280 max-line-length=80
280 max-line-length=80
281
281
282 # Maximum number of lines in a module
282 # Maximum number of lines in a module
283 max-module-lines=1000
283 max-module-lines=1000
284
284
285 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
285 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
286 # tab).
286 # tab).
287 indent-string=' '
287 indent-string=' '
288
288
289
289
290 # checks for:
290 # checks for:
291 # * warning notes in the code like FIXME, XXX
291 # * warning notes in the code like FIXME, XXX
292 # * PEP 263: source code with non ascii character but no encoding declaration
292 # * PEP 263: source code with non ascii character but no encoding declaration
293 #
293 #
294 [MISCELLANEOUS]
294 [MISCELLANEOUS]
295
295
296 # List of note tags to take in consideration, separated by a comma.
296 # List of note tags to take in consideration, separated by a comma.
297 notes=FIXME,XXX,TODO
297 notes=FIXME,XXX,TODO
298
298
299
299
300 # checks for similarities and duplicated code. This computation may be
300 # checks for similarities and duplicated code. This computation may be
301 # memory / CPU intensive, so you should disable it if you experiments some
301 # memory / CPU intensive, so you should disable it if you experiments some
302 # problems.
302 # problems.
303 #
303 #
304 [SIMILARITIES]
304 [SIMILARITIES]
305
305
306 # Minimum lines number of a similarity.
306 # Minimum lines number of a similarity.
307 min-similarity-lines=4
307 min-similarity-lines=4
308
308
309 # Ignore comments when computing similarities.
309 # Ignore comments when computing similarities.
310 ignore-comments=yes
310 ignore-comments=yes
311
311
312 # Ignore docstrings when computing similarities.
312 # Ignore docstrings when computing similarities.
313 ignore-docstrings=yes
313 ignore-docstrings=yes
General Comments 0
You need to be logged in to leave comments. Login now