forked from quantumlib/Cirq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to using the incremental pylint. Turn on documentation linters. (
quantumlib#4267) This PR is related to: quantumlib#3388 We'd like to add some documentation rules to pylint but doing so would require us to add a significant amount of documentation to the current code. In order to start enforcing this rule sooner rather than later. I added an incremental lint task to the ci. The incremental lint task will check more rules but only check them on changed files.
- Loading branch information
Showing
4 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
[MASTER] | ||
load-plugins=pylint.extensions.docparams,pylint.extensions.docstyle | ||
max-line-length=100 | ||
disable=all | ||
ignore-patterns=.*_pb2\.py,quantum_engine_service_client.py,engine_pb2_grpc.py | ||
output-format=colorized | ||
score=no | ||
reports=no | ||
enable= | ||
anomalous-backslash-in-string, | ||
assert-on-tuple, | ||
bad-indentation, | ||
bad-option-value, | ||
bad-reversed-sequence, | ||
bad-super-call, | ||
consider-merging-isinstance, | ||
continue-in-finally, | ||
dangerous-default-value, | ||
docstyle, | ||
duplicate-argument-name, | ||
expression-not-assigned, | ||
function-redefined, | ||
inconsistent-mro, | ||
init-is-generator, | ||
line-too-long, | ||
lost-exception, | ||
missing-kwoa, | ||
mixed-indentation, | ||
mixed-line-endings, | ||
not-callable, | ||
no-value-for-parameter, | ||
nonexistent-operator, | ||
not-in-loop, | ||
parameter_documentation, | ||
pointless-statement, | ||
redefined-builtin, | ||
relative-import, | ||
return-arg-in-generator, | ||
return-in-init, | ||
return-outside-function, | ||
simplifiable-if-statement, | ||
syntax-error, | ||
too-many-function-args, | ||
trailing-whitespace, | ||
# Disabling until https://github.com/PyCQA/pylint/issues/3791 is fixed | ||
# undefined-variable, | ||
unexpected-keyword-arg, | ||
unhashable-dict-key, | ||
unnecessary-pass, | ||
unreachable, | ||
unrecognized-inline-option, | ||
unused-import, | ||
unnecessary-semicolon, | ||
unused-variable, | ||
unused-wildcard-import, | ||
wildcard-import, | ||
wrong-import-order, | ||
wrong-import-position, | ||
yield-outside-function | ||
|
||
# Ignore long lines containing urls or pylint directives. | ||
ignore-long-lines=^(.*#\w*pylint: disable.*|\s*(# )?<?https?://\S+>?)$ | ||
|
||
[TYPECHECK] | ||
|
||
# List of members which are set dynamically and missed by pylint inference | ||
# system, and so shouldn't trigger E1101 when accessed. Python regular | ||
# expressions are accepted. | ||
generated-members=numpy.* | ||
|
||
|
||
[IMPORTS] | ||
|
||
# Force import order to recognize a module as part of a third party library. | ||
known-third-party=cirq,cirq_google,cirq_aqt,cirq_ionq |