diff --git a/pylintrc b/pylintrc index 2c8a26b..2712717 100644 --- a/pylintrc +++ b/pylintrc @@ -2,12 +2,16 @@ # ** DO NOT EDIT THIS FILE ** # *************************** # -# This file was generated by edx-lint: http://github.com/edx/edx-lint +# This file was generated by edx-lint: https://github.com/openedx/edx-lint # # If you want to change this file, you have two choices, depending on whether # you want to make a local change that applies only to this repo, or whether # you want to make a central change that applies to all repos using edx-lint. # +# Note: If your pylintrc file is simply out-of-date relative to the latest +# pylintrc in edx-lint, ensure you have the latest edx-lint installed +# and then follow the steps for a "LOCAL CHANGE". +# # LOCAL CHANGE: # # 1. Edit the local pylintrc_tweaks file to add changes just to this @@ -24,7 +28,7 @@ # CENTRAL CHANGE: # # 1. Edit the pylintrc file in the edx-lint repo at -# https://github.com/edx/edx-lint/blob/master/edx_lint/files/pylintrc +# https://github.com/openedx/edx-lint/blob/master/edx_lint/files/pylintrc # # 2. install the updated version of edx-lint (in edx-lint): # @@ -32,19 +36,16 @@ # # 3. Run (in edx-lint): # -# # uses pylintrc_tweaks from edx-lint for linting in edx-lint -# # NOTE: Use Python 3.x, which no longer includes comments in the output file # $ edx_lint write pylintrc # # 4. Make a new version of edx_lint, submit and review a pull request with the -# pylintrc update, and after merging, update the edx-lint version by -# creating a new tag in the repo (uses pbr). +# pylintrc update, and after merging, update the edx-lint version and +# publish the new version. # # 5. In your local repo, install the newer version of edx-lint. # # 6. Run: # -# # uses local pylintrc_tweaks # $ edx_lint write pylintrc # # 7. This will modify the local file. Submit a pull request to get it @@ -63,6 +64,8 @@ # SERIOUSLY. # # ------------------------------ +# Generated by edx-lint version: 5.3.0 +# ------------------------------ [MASTER] ignore = migrations persistent = yes @@ -70,279 +73,200 @@ load-plugins = edx_lint.pylint,pylint_django,pylint_celery [MESSAGES CONTROL] enable = - # These are controlled by explicit choices in the pylintrc files blacklisted-name, line-too-long, - # These affect the correctness of the code - syntax-error, - init-is-generator, - return-in-init, - function-redefined, - not-in-loop, - return-outside-function, - yield-outside-function, - return-arg-in-generator, - nonexistent-operator, - duplicate-argument-name, + abstract-class-instantiated, - bad-reversed-sequence, - continue-in-finally, - method-hidden, + abstract-method, access-member-before-definition, - no-method-argument, - no-self-argument, - invalid-slots-object, + anomalous-backslash-in-string, + anomalous-unicode-escape-in-string, + arguments-differ, + assert-on-tuple, assigning-non-slot, - invalid-slots, - inherit-non-class, - inconsistent-mro, + assignment-from-no-return, + assignment-from-none, + attribute-defined-outside-init, + bad-except-order, + bad-format-character, + bad-format-string-key, + bad-format-string, + bad-open-mode, + bad-reversed-sequence, + bad-staticmethod-argument, + bad-str-strip-call, + bad-super-call, + binary-op-exception, + boolean-datetime, + catching-non-exception, + cell-var-from-loop, + confusing-with-statement, + continue-in-finally, + dangerous-default-value, + duplicate-argument-name, duplicate-bases, - non-iterator-returned, - unexpected-special-method-signature, - invalid-length-returned, + duplicate-except, + duplicate-key, + expression-not-assigned, + format-combined-specification, + format-needs-mapping, + function-redefined, + global-variable-undefined, import-error, - used-before-assignment, - undefined-variable, - undefined-all-variable, + import-self, + inconsistent-mro, + inherit-non-class, + init-is-generator, invalid-all-object, - no-name-in-module, - unbalance-tuple-unpacking, - unpacking-non-sequence, - bad-except-order, - raising-bad-type, - misplaced-bare-raise, - raising-non-exception, - nonimplemented-raised, - catching-non-exception, - slots-on-old-class, - super-on-old-class, - bad-super-call, - missing-super-argument, - no-member, - not-callable, - assignment-from-no-return, - no-value-for-parameter, - too-many-function-args, - unexpected-keyword-arg, - redundant-keyword-arg, + invalid-format-index, + invalid-length-returned, invalid-sequence-index, invalid-slice-index, - assignment-from-none, - not-context-manager, + invalid-slots-object, + invalid-slots, invalid-unary-operand-type, - unsupported-binary-operation, - repeated-keyword, - not-an-iterable, - not-a-mapping, - unsupported-membership-test, - unsubscriptable-object, - logging-unsupported-format, - logging-too-many-args, logging-too-few-args, - bad-format-character, - truncated-format-string, - mixed-fomat-string, - format-needs-mapping, + logging-too-many-args, + logging-unsupported-format, + lost-exception, + method-hidden, + misplaced-bare-raise, + misplaced-future, + missing-format-argument-key, + missing-format-attribute, missing-format-string-key, - too-many-format-args, - too-few-format-args, - bad-str-strip-call, - model-unicode-not-callable, - super-method-not-called, + no-member, + no-method-argument, + no-name-in-module, + no-self-argument, + no-value-for-parameter, + non-iterator-returned, non-parent-method-called, - test-inherits-tests, - translation-of-non-string, - redefined-variable-type, - cyclical-import, - unreachable, - dangerous-default-value, + nonexistent-operator, + not-a-mapping, + not-an-iterable, + not-callable, + not-context-manager, + not-in-loop, pointless-statement, pointless-string-statement, - expression-not-assigned, - duplicate-key, - confusing-with-statement, - using-constant-test, - lost-exception, - assert-on-tuple, - attribute-defined-outside-init, - bad-staticmethod-argument, - arguments-differ, + raising-bad-type, + raising-non-exception, + redefined-builtin, + redefined-outer-name, + redundant-keyword-arg, + repeated-keyword, + return-arg-in-generator, + return-in-init, + return-outside-function, signature-differs, - abstract-method, super-init-not-called, - relative-import, - import-self, - misplaced-future, - invalid-encoded-data, - global-variable-undefined, - redefined-outer-name, - redefined-builtin, - redefined-in-handler, + super-method-not-called, + syntax-error, + test-inherits-tests, + too-few-format-args, + too-many-format-args, + too-many-function-args, + translation-of-non-string, + truncated-format-string, + undefined-all-variable, undefined-loop-variable, - cell-var-from-loop, - duplicate-except, - nonstandard-exception, - binary-op-exception, - property-on-old-class, - bad-format-string-key, - unused-format-string-key, - bad-format-string, - missing-format-argument-key, + undefined-variable, + unexpected-keyword-arg, + unexpected-special-method-signature, + unpacking-non-sequence, + unreachable, + unsubscriptable-object, + unsupported-binary-operation, + unsupported-membership-test, unused-format-string-argument, - format-combined-specification, - missing-format-attribute, - invalid-format-index, - anomalous-backslash-in-string, - anomalous-unicode-escape-in-string, - bad-open-mode, - boolean-datetime, - # Checking failed for some reason - fatal, + unused-format-string-key, + used-before-assignment, + using-constant-test, + yield-outside-function, + astroid-error, - parse-error, + fatal, method-check-failed, - django-not-available, + parse-error, raw-checker-failed, - django-not-available-placeholder, - # Documentation is important + empty-docstring, invalid-characters-in-docstring, missing-docstring, wrong-spelling-in-comment, wrong-spelling-in-docstring, - # Unused code should be deleted + + unused-argument, unused-import, unused-variable, - unused-argument, - # These are dangerous! - exec-used, + eval-used, - # These represent idiomatic python. Not adhering to them - # will raise red flags with future readers. + exec-used, + bad-classmethod-argument, bad-mcs-classmethod-argument, bad-mcs-method-argument, - bad-whitespace, + bare-except, + broad-except, consider-iterating-dictionary, consider-using-enumerate, + global-at-module-level, + global-variable-not-assigned, literal-used-as-attribute, + logging-format-interpolation, + logging-not-lazy, multiple-imports, multiple-statements, - old-style-class, + no-classmethod-decorator, + no-staticmethod-decorator, + protected-access, + redundant-unittest-assert, + reimported, + simplifiable-if-statement, simplifiable-range, singleton-comparison, superfluous-parens, unidiomatic-typecheck, - unneeded-not, - wrong-assert-type, - simplifiable-if-statement, - no-classmethod-decorator, - no-staticmethod-decorator, - unnecessary-pass, unnecessary-lambda, - useless-else-on-loop, + unnecessary-pass, unnecessary-semicolon, - reimported, - global-variable-not-assigned, - global-at-module-level, - bare-except, - broad-except, - logging-not-lazy, - redundant-unittest-assert, - model-missing-unicode, - model-has-unicode, - model-no-explicit-unicode, - protected-access, - # Don't use things that are deprecated - deprecated-module, + unneeded-not, + useless-else-on-loop, + wrong-assert-type, + deprecated-method, - # These help manage code complexity + deprecated-module, + + too-many-boolean-expressions, too-many-nested-blocks, too-many-statements, - too-many-boolean-expressions, - # Consistent import order makes finding where code is - # imported from easier + + wildcard-import, wrong-import-order, wrong-import-position, - wildcard-import, - # These should be auto-fixed by any competent editor + missing-final-newline, mixed-line-endings, trailing-newlines, trailing-whitespace, unexpected-line-ending-format, - mixed-indentation, - # These attempt to limit pylint line-noise + + bad-inline-option, bad-option-value, + deprecated-pragma, unrecognized-inline-option, useless-suppression, - bad-inline-option, - deprecated-pragma, disable = - # These should be left to the discretion of the reviewer - bad-continuation, - django-not-configured, - invalid-name, - misplaced-comparison-constant, - file-ignored, bad-indentation, - lowercase-l-suffix, - unused-wildcard-import, - global-statement, - no-else-return, consider-using-f-string, - # These are disabled by pylint by default - apply-builtin, - backtick, - basestring-builtin, - buffer-builtin, - cmp-builtin, - cmp-method, - coerce-builtin, - coerce-method, - delslice-method, - dict-iter-method, - dict-view-method, duplicate-code, - execfile-builtin, - feature-toggle-needs-doc, - file-builtin, - filter-builtin-not-iterating, + file-ignored, fixme, - getslice-method, - hex-method, - illegal-waffle-usage, - import-star-module-level, - indexing-exception, - input-builtin, - intern-builtin, + global-statement, + invalid-name, locally-disabled, - locally-enabled, - logging-format-interpolation, - long-builtin, - long-suffix, - map-builtin-not-iterating, - metaclass-assignment, - next-method-called, - no-absolute-import, - no-init, - no-self-use, - nonzero-method, - oct-method, - old-division, - old-ne-operator, - old-octal-literal, - old-raise-syntax, - parameter-unpacking, - print-statement, - raising-string, - range-builtin-not-iterating, - raw_input-builtin, - reduce-builtin, - reload-builtin, - round-builtin, - setslice-method, - standarderror-builtin, + no-else-return, suppressed-message, too-few-public-methods, too-many-ancestors, @@ -354,21 +278,24 @@ disable = too-many-public-methods, too-many-return-statements, ungrouped-imports, - unichr-builtin, - unicode-builtin, - unpacking-in-except, - using-cmp-argument, - xrange-builtin, - zip-builtin-not-iterating,,useless-object-inheritance + unspecified-encoding, + unused-wildcard-import, + use-maxsplit-arg, + + feature-toggle-needs-doc, + illegal-waffle-usage, + + logging-fstring-interpolation, + useless-object-inheritance, + django-not-configured, + no-self-use [REPORTS] output-format = text -files-output = no reports = no -evaluation = 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) +score = no [BASIC] -bad-functions = map,filter,apply,input module-rgx = (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ const-rgx = (([A-Z_][A-Z0-9_]*)|(__.*__)|log|urlpatterns)$ class-rgx = [A-Z_][a-zA-Z0-9]+$ @@ -388,7 +315,6 @@ docstring-min-length = 5 max-line-length = 120 ignore-long-lines = ^\s*(# )?((?)|(\.\. \w+: .*))$ single-line-if-stmt = no -no-space-check = trailing-comma,dict-separator max-module-lines = 1000 indent-string = ' ' @@ -459,4 +385,4 @@ int-import-graph = [EXCEPTIONS] overgeneral-exceptions = Exception -# e90fdefebd9c89aa0e2659cecf3e32403c596f41 +# 1e3dbff6aa778644c68d245ad972c7cf9926188a diff --git a/pylintrc_tweaks b/pylintrc_tweaks index 908192c..eab4e62 100644 --- a/pylintrc_tweaks +++ b/pylintrc_tweaks @@ -7,5 +7,7 @@ max-line-length = 120 [MESSAGES CONTROL] -# Disable useless-object-inheritance -disable+ = ,useless-object-inheritance \ No newline at end of file +disable+ = + useless-object-inheritance, + django-not-configured, + no-self-use