blob: 1a47c025b7f8379058404b769127ae89fed040aa [file] [log] [blame]
Jon Wayne Parrott377f2932016-10-04 10:20:36 -07001[MASTER]
2# Add files or directories to the blacklist. They should be base names, not
3# paths.
4ignore=CVS,.git,.cache,.tox,.nox
5
6# List of plugins (as comma separated values of python modules names) to load,
7# usually to register additional checkers.
8# DEFAULT: load-plugins=
9# RATIONALE: We want to make sure our docstrings match the objects
10# they document.
11load-plugins=pylint.extensions.check_docs
12
13[MESSAGES CONTROL]
14# Disable the message, report, category or checker with the given id(s). You
15# can either give multiple identifiers separated by comma (,) or put this
16# option multiple times (only on the command line, not in the configuration
17# file where it should appear only once).You can also use "--disable=all" to
18# disable everything first and then reenable specific checks. For example, if
19# you want to run only the similarities checker, you can use "--disable=all
20# --enable=similarities". If you want to run only the classes checker, but have
21# no Warning level messages displayed, use"--disable=all --enable=classes
22# --disable=W"
23#
24# RATIONALE:
25# - maybe-no-member: bi-modal functions confuse pylint type inference.
26# - no-member: indirections in protobuf-generated code
27# - protected-access: helpers use '_foo' of classes from generated code.
28# - similarities: 'Bucket' and 'Blob' define 'metageneration' and 'owner' with
29# identical implementation but different docstrings.
30# - star-args: standard Python idioms for varargs:
31# ancestor = Query().filter(*order_props)
32# - redefined-variable-type: This error is overzealous and complains at e.g.
33# if some_prop:
34# return int(value)
35# else:
36# return float(value)
37# - import-error: imports are checked via tests.
38# - wrong-import-position: This error is overzealous. It assumes imports are
39# completed whenever something non-trivial is
40# defined, e.g.
41# try:
42# from foo import Bar
43# except ImportError:
44# class Bar(object):
45# """Hi everyone"""
46# and thus causes subsequent imports to be
47# diagnosed as out-of-order.
48# - no-name-in-module: Error gives a lot of false positives for names which
49# are defined dynamically. Also, any truly missing names
50# will be detected by our 100% code coverage.
51# - locally-disabled: Allow us to make exceptions in edge cases, notably where
52# pylint doesn't recognize inherited properties and methods
53# and gives unused-argument errors.
54# TEMPORARILY DISABLE AND SHOULD BE REMOVED:
55# - fixme: disabled until 1.0
56#
57disable =
58 import-star-module-level,
59 old-octal-literal,
60 oct-method,
61 print-statement,
62 unpacking-in-except,
63 parameter-unpacking,
64 backtick,
65 old-raise-syntax,
66 old-ne-operator,
67 long-suffix,
68 dict-view-method,
69 dict-iter-method,
70 metaclass-assignment,
71 next-method-called,
72 raising-string,
73 indexing-exception,
74 raw_input-builtin,
75 long-builtin,
76 file-builtin,
77 execfile-builtin,
78 coerce-builtin,
79 cmp-builtin,
80 buffer-builtin,
81 basestring-builtin,
82 apply-builtin,
83 filter-builtin-not-iterating,
84 using-cmp-argument,
85 useless-suppression,
86 range-builtin-not-iterating,
87 suppressed-message,
88 no-absolute-import,
89 old-division,
90 cmp-method,
91 reload-builtin,
92 zip-builtin-not-iterating,
93 intern-builtin,
94 unichr-builtin,
95 reduce-builtin,
96 standarderror-builtin,
97 unicode-builtin,
98 xrange-builtin,
99 coerce-method,
100 delslice-method,
101 getslice-method,
102 setslice-method,
103 input-builtin,
104 round-builtin,
105 hex-method,
106 nonzero-method,
107 map-builtin-not-iterating,
108 maybe-no-member,
109 no-member,
110 protected-access,
111 similarities,
112 star-args,
113 redefined-variable-type,
114 import-error,
115 wrong-import-position,
116 no-name-in-module,
117 locally-disabled,
118 fixme
119
120
121[REPORTS]
122# Tells whether to display a full report or only the messages
123# RATIONALE: noisy
124reports=no
125
126[BASIC]
127# Regular expression matching correct method names
128# DEFAULT: method-rgx=[a-z_][a-z0-9_]{2,30}$
129# RATIONALE: Some methods have longer names to be more descriptive or precise,
130# especially those that implemented wordy RFCs.
131method-rgx=[a-z_][a-z0-9_]{2,40}$
132
133# Regular expression matching correct function names
134# DEFAULT function-rgx=[a-z_][a-z0-9_]{2,30}$
135# RATIONALE: Some methods have longer names to be more descriptive or precise,
136# especially those that implemented wordy RFCs.
137function-rgx=[a-z_][a-z0-9_]{2,40}$
138
139[TYPECHECK]
140# List of module names for which member attributes should not be checked
141# (useful for modules/projects where namespaces are manipulated during runtime
142# and thus existing member attributes cannot be deduced by static analysis. It
143# supports qualified module names, as well as Unix pattern matching.
144# DEFAULT: ignored-modules=
145# RATIONALE: six aliases stuff for compatibility.
146# google.protobuf fixes up namespace package "late".
147ignored-modules = six, google.protobuf
148
149
150[DESIGN]
151# Minimum number of public methods for a class (see R0903).
152# DEFAULT: min-public-methods=2
153# RATIONALE: context mgrs may have *no* public methods
154min-public-methods=0
155
156# Maximum number of arguments for function / method
157# DEFAULT: max-args=5
158# RATIONALE: Many credentials classes take a lot of parameters.
159max-args = 10
160
161# Maximum number of attributes for a class (see R0902).
162# DEFAULT: max-attributes=7
163# RATIONALE: Many credentials need to track lots of properties.
164max-attributes=15