Skip to content

Commit 4a2a164

Browse files
awleblangbusbey
authored andcommitted
HBASE-18041 Add .pylintrc to HBase
This commit copies the pylintrc file that apache yetus uses for itself to HBase. Differences: - Yetus uses 2 space indents and the initial consensus in the JIRA discussion asked for 4 space indents (as called for in PEP 8) Amending-Author: Alex Leblang Signed-off-by: Sean Busbey <[email protected]>
1 parent 8bb4d15 commit 4a2a164

File tree

1 file changed

+303
-0
lines changed

1 file changed

+303
-0
lines changed

.pylintrc

Lines changed: 303 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,303 @@
1+
[MASTER]
2+
3+
# Specify a configuration file.
4+
#rcfile=
5+
6+
# Python code to execute, usually for sys.path manipulation such as
7+
# pygtk.require().
8+
#init-hook=
9+
10+
# Profiled execution.
11+
#profile=no
12+
13+
# Add files or directories to the blacklist. They should be base names, not
14+
# paths.
15+
ignore=CVS
16+
17+
# Pickle collected data for later comparisons.
18+
persistent=yes
19+
20+
# List of plugins (as comma separated values of python modules names) to load,
21+
# usually to register additional checkers.
22+
load-plugins=
23+
24+
25+
[MESSAGES CONTROL]
26+
27+
# Enable the message, report, category or checker with the given id(s). You can
28+
# either give multiple identifier separated by comma (,) or put this option
29+
# multiple time.
30+
#enable=
31+
32+
# Disable the message, report, category or checker with the given id(s). You
33+
# can either give multiple identifier separated by comma (,) or put this option
34+
# multiple time (only on the command line, not in the configuration file where
35+
# it should appear only once).
36+
# CHANGED:
37+
# C0103: Invalid name ""
38+
# C0111: Missing docstring
39+
# C0302: Too many lines in module (N)
40+
# I0010: Unable to consider inline option ''
41+
# I0011: Locally disabling WNNNN
42+
#
43+
# R0801: Similar lines in N files
44+
# R0901: Too many ancestors (8/7)
45+
# R0902: Too many instance attributes (N/7)
46+
# R0903: Too few public methods (N/2)
47+
# R0904: Too many public methods (N/20)
48+
# R0911: Too many return statements (N/6)
49+
# R0912: Too many branches (N/12)
50+
# R0913: Too many arguments (N/5)
51+
# R0914: Too many local variables (N/15)
52+
# R0915: Too many statements (N/50)
53+
# R0921: Abstract class not referenced
54+
# R0922: Abstract class is only referenced 1 times
55+
# W0122: Use of the exec statement
56+
# W0141: Used builtin function ''
57+
# W0142: Used * or ** magic
58+
# W0402: Uses of a deprecated module 'string'
59+
# W0404: 41: Reimport 'XX' (imported line NN)
60+
# W0511: TODO
61+
# W0603: Using the global statement
62+
# W0703: Catch "Exception"
63+
# W1201: Specify string format arguments as logging function parameters
64+
#
65+
# These should get enabled, but the codebase has too many violations currently.
66+
# bad-continuation
67+
# anomalous-backslash-in-string
68+
# bad-context-manager
69+
# bad-indentation
70+
# bad-str-strip-call
71+
# bad-whitespace
72+
# cell-var-from-loop
73+
# deprecated-lambda
74+
# eval-used
75+
# function-redefined
76+
# import-error
77+
# locally-enabled
78+
# missing-final-newline
79+
# no-init
80+
# no-name-in-module
81+
# no-self-use
82+
# not-callable
83+
# old-style-class
84+
# protected-access
85+
# superfluous-parens
86+
# super-on-old-class
87+
# too-many-function-args
88+
# trailing-whitespace
89+
# unnecessary-semicolon
90+
# unpacking-non-sequence
91+
# unused-import
92+
# useless-else-on-loop
93+
disable=C0103,C0111,C0302,I0010,I0011,R0801,R0901,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R0921,R0922,W0122,W0141,W0142,W0402,W0404,W0511,W0603,W0703,W1201,bad-continuation,anomalous-backslash-in-string,bad-context-manager,bad-indentation,bad-str-strip-call,bad-whitespace,cell-var-from-loop,deprecated-lambda,eval-used,function-redefined,import-error,locally-enabled,missing-final-newline,no-init,no-name-in-module,no-self-use,not-callable,old-style-class,protected-access,superfluous-parens,super-on-old-class,too-many-function-args,trailing-whitespace,unnecessary-semicolon,unpacking-non-sequence,unused-import,useless-else-on-loop
94+
95+
96+
[REPORTS]
97+
98+
# Set the output format. Available formats are text, parseable, colorized, msvs
99+
# (visual studio) and html
100+
output-format=text
101+
102+
# Put messages in a separate file for each module / package specified on the
103+
# command line instead of printing them on stdout. Reports (if any) will be
104+
# written in a file name "pylint_global.[txt|html]".
105+
files-output=no
106+
107+
# Tells whether to display a full report or only the messages
108+
# CHANGED:
109+
reports=no
110+
111+
# Python expression which should return a note less than 10 (10 is the highest
112+
# note). You have access to the variables errors warning, statement which
113+
# respectively contain the number of errors / warnings messages and the total
114+
# number of statements analyzed. This is used by the global evaluation report
115+
# (RP0004).
116+
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
117+
118+
# Add a comment according to your evaluation note. This is used by the global
119+
# evaluation report (RP0004).
120+
#comment=no
121+
122+
123+
[VARIABLES]
124+
125+
# Tells whether we should check for unused import in __init__ files.
126+
init-import=no
127+
128+
# A regular expression matching the beginning of the name of dummy variables
129+
# (i.e. not used).
130+
dummy-variables-rgx=_|dummy
131+
132+
# List of additional names supposed to be defined in builtins. Remember that
133+
# you should avoid to define new builtins when possible.
134+
additional-builtins=
135+
136+
137+
[TYPECHECK]
138+
139+
# Tells whether missing members accessed in mixin class should be ignored. A
140+
# mixin class is detected if its name ends with "mixin" (case insensitive).
141+
ignore-mixin-members=yes
142+
143+
# List of classes names for which member attributes should not be checked
144+
# (useful for classes with attributes dynamically set).
145+
ignored-classes=SQLObject,twisted.internet.reactor,hashlib,google.appengine.api.memcache
146+
147+
# When zope mode is activated, add a predefined set of Zope acquired attributes
148+
# to generated-members.
149+
#zope=no
150+
151+
# List of members which are set dynamically and missed by pylint inference
152+
# system, and so shouldn't trigger E0201 when accessed. Python regular
153+
# expressions are accepted.
154+
generated-members=REQUEST,acl_users,aq_parent,multiprocessing.managers.SyncManager
155+
156+
157+
[MISCELLANEOUS]
158+
159+
# List of note tags to take in consideration, separated by a comma.
160+
notes=FIXME,XXX,TODO
161+
162+
163+
[SIMILARITIES]
164+
165+
# Minimum lines number of a similarity.
166+
min-similarity-lines=4
167+
168+
# Ignore comments when computing similarities.
169+
ignore-comments=yes
170+
171+
# Ignore docstrings when computing similarities.
172+
ignore-docstrings=yes
173+
174+
175+
[FORMAT]
176+
177+
# Maximum number of characters on a single line.
178+
max-line-length=100
179+
180+
# Maximum number of lines in a module
181+
max-module-lines=1000
182+
183+
# String used as indentation unit
184+
indent-string=' '
185+
186+
187+
[BASIC]
188+
189+
# Required attributes for module, separated by a comma
190+
#required-attributes=
191+
192+
# List of builtins function names that should not be used, separated by a comma
193+
bad-functions=map,filter,apply,input
194+
195+
# Regular expression which should only match correct module names
196+
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
197+
198+
# Regular expression which should only match correct module level names
199+
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
200+
201+
# Regular expression which should only match correct class names
202+
class-rgx=[A-Z_][a-zA-Z0-9]+$
203+
204+
# Regular expression which should only match correct function names
205+
function-rgx=[a-z_][a-z0-9_]{2,30}$
206+
207+
# Regular expression which should only match correct method names
208+
method-rgx=[a-z_][a-z0-9_]{2,30}$
209+
210+
# Regular expression which should only match correct instance attribute names
211+
attr-rgx=[a-z_][a-z0-9_]{2,30}$
212+
213+
# Regular expression which should only match correct argument names
214+
argument-rgx=[a-z_][a-z0-9_]{2,30}$
215+
216+
# Regular expression which should only match correct variable names
217+
variable-rgx=[a-z_][a-z0-9_]{2,30}$
218+
219+
# Regular expression which should only match correct list comprehension /
220+
# generator expression variable names
221+
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
222+
223+
# Good variable names which should always be accepted, separated by a comma
224+
good-names=i,j,k,ex,Run,_
225+
226+
# Bad variable names which should always be refused, separated by a comma
227+
bad-names=foo,bar,baz,toto,tutu,tata
228+
229+
# Regular expression which should only match functions or classes name which do
230+
# not require a docstring
231+
no-docstring-rgx=__.*__
232+
233+
234+
[DESIGN]
235+
236+
# Maximum number of arguments for function / method
237+
max-args=5
238+
239+
# Argument names that match this expression will be ignored. Default to name
240+
# with leading underscore
241+
ignored-argument-names=_.*
242+
243+
# Maximum number of locals for function / method body
244+
max-locals=15
245+
246+
# Maximum number of return / yield for function / method body
247+
max-returns=6
248+
249+
# Maximum number of branch for function / method body
250+
max-branchs=12
251+
252+
# Maximum number of statements in function / method body
253+
max-statements=50
254+
255+
# Maximum number of parents for a class (see R0901).
256+
max-parents=7
257+
258+
# Maximum number of attributes for a class (see R0902).
259+
max-attributes=7
260+
261+
# Minimum number of public methods for a class (see R0903).
262+
min-public-methods=2
263+
264+
# Maximum number of public methods for a class (see R0904).
265+
max-public-methods=20
266+
267+
268+
[CLASSES]
269+
270+
# List of interface methods to ignore, separated by a comma. This is used for
271+
# instance to not check methods defines in Zope's Interface base class.
272+
#ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
273+
274+
# List of method names used to declare (i.e. assign) instance attributes.
275+
defining-attr-methods=__init__,__new__,setUp
276+
277+
# List of valid names for the first argument in a class method.
278+
valid-classmethod-first-arg=cls
279+
280+
281+
[IMPORTS]
282+
283+
# Deprecated modules which should not be used, separated by a comma
284+
deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
285+
286+
# Create a graph of every (i.e. internal and external) dependencies in the
287+
# given file (report RP0402 must not be disabled)
288+
import-graph=
289+
290+
# Create a graph of external dependencies in the given file (report RP0402 must
291+
# not be disabled)
292+
ext-import-graph=
293+
294+
# Create a graph of internal dependencies in the given file (report RP0402 must
295+
# not be disabled)
296+
int-import-graph=
297+
298+
299+
[EXCEPTIONS]
300+
301+
# Exceptions that will emit a warning when being caught. Defaults to
302+
# "Exception"
303+
overgeneral-exceptions=Exception

0 commit comments

Comments
 (0)