From 6a187576a928af5d741af56eccf3d90415d82059 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sat, 10 Sep 2022 15:55:15 -0400 Subject: [PATCH 1/3] chore: run `edx_lint` update with the current version of the repo. --- pylintrc | 351 ++++++++++++++++++++++--------------------------------- 1 file changed, 140 insertions(+), 211 deletions(-) diff --git a/pylintrc b/pylintrc index 4eca5da3..3d3719f3 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.2.5 +# ------------------------------ [MASTER] ignore = migrations persistent = yes @@ -73,136 +76,120 @@ enable = blacklisted-name, line-too-long, - 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, + unused-format-string-key, + used-before-assignment, + using-constant-test, + yield-outside-function, - fatal, astroid-error, - parse-error, + fatal, method-check-failed, - django-not-available, + parse-error, raw-checker-failed, - django-not-available-placeholder, empty-docstring, invalid-characters-in-docstring, @@ -210,133 +197,76 @@ enable = wrong-spelling-in-comment, wrong-spelling-in-docstring, + unused-argument, unused-import, unused-variable, - unused-argument, - exec-used, eval-used, + 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, + unneeded-not, + useless-else-on-loop, + wrong-assert-type, - deprecated-module, deprecated-method, + deprecated-module, + too-many-boolean-expressions, too-many-nested-blocks, too-many-statements, - too-many-boolean-expressions, + wildcard-import, wrong-import-order, wrong-import-position, - wildcard-import, missing-final-newline, mixed-line-endings, trailing-newlines, trailing-whitespace, unexpected-line-ending-format, - mixed-indentation, + bad-inline-option, bad-option-value, + deprecated-pragma, unrecognized-inline-option, useless-suppression, - bad-inline-option, - deprecated-pragma, disable = - bad-continuation, - invalid-name, - misplaced-comparison-constant, - file-ignored, bad-indentation, - lowercase-l-suffix, - unused-wildcard-import, - global-statement, - no-else-return, - - apply-builtin, - backtick, - basestring-builtin, - buffer-builtin, - cmp-builtin, - cmp-method, - coerce-builtin, - coerce-method, - delslice-method, - dict-iter-method, - dict-view-method, + consider-using-f-string, 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, @@ -348,21 +278,21 @@ 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, + unspecified-encoding, + unused-wildcard-import, + use-maxsplit-arg, + + feature-toggle-needs-doc, + illegal-waffle-usage, + + logging-fstring-interpolation, [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]+$ @@ -382,7 +312,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 = ' ' @@ -453,4 +382,4 @@ int-import-graph = [EXCEPTIONS] overgeneral-exceptions = Exception -# d6167e53b51b640a8e3c54b3b108cd94ce4f28e8 +# 15f4c0e4571a74bff869eddc0b2e573520a58d0c From c49c78afb7a86a19870554725dc551cdbbd048ee Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sat, 10 Sep 2022 15:55:15 -0400 Subject: [PATCH 2/3] fix: fix github url strings (org edx -> openedx) --- .github/workflows/upgrade-python-requirements.yml | 2 +- README.rst | 6 +++--- doc/getting_started.rst | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/upgrade-python-requirements.yml b/.github/workflows/upgrade-python-requirements.yml index f542a204..c1cbb2db 100644 --- a/.github/workflows/upgrade-python-requirements.yml +++ b/.github/workflows/upgrade-python-requirements.yml @@ -39,7 +39,7 @@ jobs: - name: setup testeng-ci run: | - git clone https://github.com/edx/testeng-ci.git + git clone https://github.com/openedx/testeng-ci.git cd $GITHUB_WORKSPACE/testeng-ci pip install -r requirements/base.txt - name: create pull request diff --git a/README.rst b/README.rst index afb2402a..8672e726 100644 --- a/README.rst +++ b/README.rst @@ -204,7 +204,7 @@ There is a rich community of XBlock developers that have put together a large number of XBlocks that have been used in various contexts, mostly on the edx-platform. You can see examples of what that community has done in the `edx-platform wiki`_. -.. _the README: https://github.com/edx/xblock-sdk/blob/master/sample_xblocks/README.rst +.. _the README: https://github.com/openedx/xblock-sdk/blob/master/sample_xblocks/README.rst .. _edx-platform wiki: https://openedx.atlassian.net/wiki/spaces/COMM/pages/43385346/XBlocks+Directory @@ -243,7 +243,7 @@ You can discuss this code on the `edx-code Google Group`__ or in the __ https://groups.google.com/group/edx-code -.. |build-status| image:: https://github.com/edx/xblock-sdk/workflows/Python%20CI/badge.svg?branch=master -:target: https://github.com/edx/xblock-sdk/actions?query=workflow%3A%22Python+CI%22 +.. |build-status| image:: https://github.com/openedx/xblock-sdk/workflows/Python%20CI/badge.svg?branch=master +:target: https://github.com/openedx/xblock-sdk/actions?query=workflow%3A%22Python+CI%22 .. |coverage-status| image:: https://coveralls.io/repos/edx/xblock-sdk/badge.png :target: https://coveralls.io/r/edx/xblock-sdk diff --git a/doc/getting_started.rst b/doc/getting_started.rst index 33915cbb..63075d9e 100644 --- a/doc/getting_started.rst +++ b/doc/getting_started.rst @@ -41,7 +41,7 @@ Get the XBlock-SDK repository The XBlock code is on Github. Get the code by cloning the XBlock-SDK repo:: - $ git clone https://github.com/edx/xblock-sdk.git + $ git clone https://github.com/openedx/xblock-sdk.git This will create the XBlock-SDK directory in your current directory. From eb94a84db6a037f36db993dbc037ca53ffc7bbe4 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Sat, 10 Sep 2022 17:43:04 -0400 Subject: [PATCH 3/3] fix: update path to .github workflows to read from openedx org --- .github/workflows/commitlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index e2b06615..fec11d6c 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -7,4 +7,4 @@ on: jobs: commitlint: - uses: edx/.github/.github/workflows/commitlint.yml@master + uses: openedx/.github/.github/workflows/commitlint.yml@master