Skip to content

Commit c86bb15

Browse files
Merge pull request #1 from brandonwillard/use-newer-unification
Use unification fork and update linting
2 parents 0efe5e2 + c90b906 commit c86bb15

File tree

10 files changed

+480
-31
lines changed

10 files changed

+480
-31
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ coverage.xml
103103
*.cover
104104
.hypothesis/
105105
.pytest_cache/
106+
testing-report.html
106107

107108
# Translations
108109
*.mo

.pylintrc

Lines changed: 372 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,372 @@
1+
[MASTER]
2+
# Use multiple processes to speed up Pylint.
3+
jobs=0
4+
5+
# Allow loading of arbitrary C extensions. Extensions are imported into the
6+
# active Python interpreter and may run arbitrary code.
7+
unsafe-load-any-extension=no
8+
9+
# Allow optimization of some AST trees. This will activate a peephole AST
10+
# optimizer, which will apply various small optimizations. For instance, it can
11+
# be used to obtain the result of joining multiple strings with the addition
12+
# operator. Joining a lot of strings can lead to a maximum recursion error in
13+
# Pylint and this flag can prevent that. It has one side effect, the resulting
14+
# AST will be different than the one from reality.
15+
optimize-ast=no
16+
17+
[MESSAGES CONTROL]
18+
19+
# Only show warnings with the listed confidence levels. Leave empty to show
20+
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
21+
confidence=
22+
23+
# Disable the message, report, category or checker with the given id(s). You
24+
# can either give multiple identifiers separated by comma (,) or put this
25+
# option multiple times (only on the command line, not in the configuration
26+
# file where it should appear only once).You can also use "--disable=all" to
27+
# disable everything first and then reenable specific checks. For example, if
28+
# you want to run only the similarities checker, you can use "--disable=all
29+
# --enable=similarities". If you want to run only the classes checker, but have
30+
# no Warning level messages displayed, use"--disable=all --enable=classes
31+
# --disable=W"
32+
disable=all
33+
34+
# Enable the message, report, category or checker with the given id(s). You can
35+
# either give multiple identifier separated by comma (,) or put this option
36+
# multiple time. See also the "--disable" option for examples.
37+
enable=import-error,
38+
import-self,
39+
reimported,
40+
wildcard-import,
41+
misplaced-future,
42+
relative-import,
43+
deprecated-module,
44+
unpacking-non-sequence,
45+
invalid-all-object,
46+
undefined-all-variable,
47+
used-before-assignment,
48+
cell-var-from-loop,
49+
global-variable-undefined,
50+
dangerous-default-value,
51+
# redefined-builtin,
52+
redefine-in-handler,
53+
unused-import,
54+
unused-wildcard-import,
55+
global-variable-not-assigned,
56+
undefined-loop-variable,
57+
global-at-module-level,
58+
bad-open-mode,
59+
redundant-unittest-assert,
60+
boolean-datetime,
61+
# unused-variable
62+
63+
64+
[REPORTS]
65+
66+
# Set the output format. Available formats are text, parseable, colorized, msvs
67+
# (visual studio) and html. You can also give a reporter class, eg
68+
# mypackage.mymodule.MyReporterClass.
69+
output-format=parseable
70+
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
73+
# written in a file name "pylint_global.[txt|html]".
74+
files-output=no
75+
76+
# Tells whether to display a full report or only the messages
77+
reports=no
78+
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
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
83+
# (RP0004).
84+
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
85+
86+
[BASIC]
87+
88+
# List of builtins function names that should not be used, separated by a comma
89+
bad-functions=map,filter,input
90+
91+
# Good variable names which should always be accepted, separated by a comma
92+
good-names=i,j,k,ex,Run,_
93+
94+
# Bad variable names which should always be refused, separated by a comma
95+
bad-names=foo,bar,baz,toto,tutu,tata
96+
97+
# Colon-delimited sets of names that determine each other's naming style when
98+
# the name regexes allow several styles.
99+
name-group=
100+
101+
# Include a hint for the correct naming format with invalid-name
102+
include-naming-hint=yes
103+
104+
# Regular expression matching correct method names
105+
method-rgx=[a-z_][a-z0-9_]{2,30}$
106+
107+
# Naming hint for method names
108+
method-name-hint=[a-z_][a-z0-9_]{2,30}$
109+
110+
# Regular expression matching correct function names
111+
function-rgx=[a-z_][a-z0-9_]{2,30}$
112+
113+
# Naming hint for function names
114+
function-name-hint=[a-z_][a-z0-9_]{2,30}$
115+
116+
# Regular expression matching correct module names
117+
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
118+
119+
# Naming hint for module names
120+
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
121+
122+
# Regular expression matching correct attribute names
123+
attr-rgx=[a-z_][a-z0-9_]{2,30}$
124+
125+
# Naming hint for attribute names
126+
attr-name-hint=[a-z_][a-z0-9_]{2,30}$
127+
128+
# Regular expression matching correct class attribute names
129+
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
130+
131+
# Naming hint for class attribute names
132+
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
133+
134+
# Regular expression matching correct constant names
135+
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
136+
137+
# Naming hint for constant names
138+
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
139+
140+
# Regular expression matching correct class names
141+
class-rgx=[A-Z_][a-zA-Z0-9]+$
142+
143+
# Naming hint for class names
144+
class-name-hint=[A-Z_][a-zA-Z0-9]+$
145+
146+
# Regular expression matching correct argument names
147+
argument-rgx=[a-z_][a-z0-9_]{2,30}$
148+
149+
# Naming hint for argument names
150+
argument-name-hint=[a-z_][a-z0-9_]{2,30}$
151+
152+
# Regular expression matching correct inline iteration names
153+
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
154+
155+
# Naming hint for inline iteration names
156+
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
157+
158+
# Regular expression matching correct variable names
159+
variable-rgx=[a-z_][a-z0-9_]{2,30}$
160+
161+
# Naming hint for variable names
162+
variable-name-hint=[a-z_][a-z0-9_]{2,30}$
163+
164+
# Regular expression which should only match function or class names that do
165+
# not require a docstring.
166+
no-docstring-rgx=^_
167+
168+
# Minimum line length for functions/classes that require docstrings, shorter
169+
# ones are exempt.
170+
docstring-min-length=-1
171+
172+
173+
[ELIF]
174+
175+
# Maximum number of nested blocks for function / method body
176+
max-nested-blocks=5
177+
178+
179+
[FORMAT]
180+
181+
# Maximum number of characters on a single line.
182+
max-line-length=100
183+
184+
# Regexp for a line that is allowed to be longer than the limit.
185+
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
186+
187+
# Allow the body of an if to be on the same line as the test if there is no
188+
# else.
189+
single-line-if-stmt=no
190+
191+
# List of optional constructs for which whitespace checking is disabled. `dict-
192+
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
193+
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
194+
# `empty-line` allows space-only lines.
195+
no-space-check=trailing-comma,dict-separator
196+
197+
# Maximum number of lines in a module
198+
max-module-lines=1000
199+
200+
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
201+
# tab).
202+
indent-string=' '
203+
204+
# Number of spaces of indent required inside a hanging or continued line.
205+
indent-after-paren=4
206+
207+
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
208+
expected-line-ending-format=
209+
210+
211+
[LOGGING]
212+
213+
# Logging modules to check that the string format arguments are in logging
214+
# function parameter format
215+
logging-modules=logging
216+
217+
218+
[MISCELLANEOUS]
219+
220+
# List of note tags to take in consideration, separated by a comma.
221+
notes=FIXME,XXX,TODO
222+
223+
224+
[SIMILARITIES]
225+
226+
# Minimum lines number of a similarity.
227+
min-similarity-lines=4
228+
229+
# Ignore comments when computing similarities.
230+
ignore-comments=yes
231+
232+
# Ignore docstrings when computing similarities.
233+
ignore-docstrings=yes
234+
235+
# Ignore imports when computing similarities.
236+
ignore-imports=no
237+
238+
239+
[SPELLING]
240+
241+
# Spelling dictionary name. Available dictionaries: none. To make it working
242+
# install python-enchant package.
243+
spelling-dict=
244+
245+
# List of comma separated words that should not be checked.
246+
spelling-ignore-words=
247+
248+
# A path to a file that contains private dictionary; one word per line.
249+
spelling-private-dict-file=
250+
251+
# Tells whether to store unknown words to indicated private dictionary in
252+
# --spelling-private-dict-file option instead of raising a message.
253+
spelling-store-unknown-words=no
254+
255+
256+
[TYPECHECK]
257+
258+
# Tells whether missing members accessed in mixin class should be ignored. A
259+
# mixin class is detected if its name ends with "mixin" (case insensitive).
260+
ignore-mixin-members=yes
261+
262+
# List of module names for which member attributes should not be checked
263+
# (useful for modules/projects where namespaces are manipulated during runtime
264+
# and thus existing member attributes cannot be deduced by static analysis. It
265+
# supports qualified module names, as well as Unix pattern matching.
266+
ignored-modules=tensorflow.core.framework,tensorflow.python.framework,tensorflow.python.ops.gen_linalg_ops
267+
268+
# List of classes names for which member attributes should not be checked
269+
# (useful for classes with attributes dynamically set). This supports can work
270+
# with qualified names.
271+
ignored-classes=
272+
273+
# List of members which are set dynamically and missed by pylint inference
274+
# system, and so shouldn't trigger E1101 when accessed. Python regular
275+
# expressions are accepted.
276+
generated-members=
277+
278+
279+
[VARIABLES]
280+
281+
# Tells whether we should check for unused import in __init__ files.
282+
init-import=no
283+
284+
# A regular expression matching the name of dummy variables (i.e. expectedly
285+
# not used).
286+
dummy-variables-rgx=_$|dummy
287+
288+
# List of additional names supposed to be defined in builtins. Remember that
289+
# you should avoid to define new builtins when possible.
290+
additional-builtins=
291+
292+
# List of strings which can identify a callback function by name. A callback
293+
# name must start or end with one of those strings.
294+
callbacks=cb_,_cb
295+
296+
297+
[CLASSES]
298+
299+
# List of method names used to declare (i.e. assign) instance attributes.
300+
defining-attr-methods=__init__,__new__,setUp
301+
302+
# List of valid names for the first argument in a class method.
303+
valid-classmethod-first-arg=cls
304+
305+
# List of valid names for the first argument in a metaclass class method.
306+
valid-metaclass-classmethod-first-arg=mcs
307+
308+
# List of member names, which should be excluded from the protected access
309+
# warning.
310+
exclude-protected=_asdict,_fields,_replace,_source,_make
311+
312+
313+
[DESIGN]
314+
315+
# Maximum number of arguments for function / method
316+
max-args=5
317+
318+
# Argument names that match this expression will be ignored. Default to name
319+
# with leading underscore
320+
ignored-argument-names=_.*
321+
322+
# Maximum number of locals for function / method body
323+
max-locals=15
324+
325+
# Maximum number of return / yield for function / method body
326+
max-returns=6
327+
328+
# Maximum number of branch for function / method body
329+
max-branches=12
330+
331+
# Maximum number of statements in function / method body
332+
max-statements=50
333+
334+
# Maximum number of parents for a class (see R0901).
335+
max-parents=7
336+
337+
# Maximum number of attributes for a class (see R0902).
338+
max-attributes=7
339+
340+
# Minimum number of public methods for a class (see R0903).
341+
min-public-methods=2
342+
343+
# Maximum number of public methods for a class (see R0904).
344+
max-public-methods=20
345+
346+
# Maximum number of boolean expressions in a if statement
347+
max-bool-expr=5
348+
349+
350+
[IMPORTS]
351+
352+
# Deprecated modules which should not be used, separated by a comma
353+
deprecated-modules=optparse
354+
355+
# Create a graph of every (i.e. internal and external) dependencies in the
356+
# given file (report RP0402 must not be disabled)
357+
import-graph=
358+
359+
# Create a graph of external dependencies in the given file (report RP0402 must
360+
# not be disabled)
361+
ext-import-graph=
362+
363+
# Create a graph of internal dependencies in the given file (report RP0402 must
364+
# not be disabled)
365+
int-import-graph=
366+
367+
368+
[EXCEPTIONS]
369+
370+
# Exceptions that will emit a warning when being caught. Defaults to
371+
# "Exception"
372+
overgeneral-exceptions=Exception

0 commit comments

Comments
 (0)