From 0a0219d9dc782eddf12953451ec94da4e6512ba2 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 10 Dec 2018 15:31:16 -0500 Subject: [PATCH 1/3] New edx-lint has unicode-format-string, disable it for now. --- pylintrc | 4 ++-- pylintrc_tweaks | 4 ++++ requirements/edx/testing.in | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pylintrc b/pylintrc index 30e67dcb30..f664b86f3e 100644 --- a/pylintrc +++ b/pylintrc @@ -345,7 +345,7 @@ disable = unpacking-in-except, using-cmp-argument, xrange-builtin, - zip-builtin-not-iterating, + zip-builtin-not-iterating,,unicode-format-string [REPORTS] output-format = text @@ -445,4 +445,4 @@ int-import-graph = [EXCEPTIONS] overgeneral-exceptions = Exception -# cb770bb6272f6fe1edfd74aa1fb912be5541481c +# c8b8d35a9a123f3c2eb3ce0cb466156bab2beedc diff --git a/pylintrc_tweaks b/pylintrc_tweaks index 1fdd6e1b25..6b4126f96c 100644 --- a/pylintrc_tweaks +++ b/pylintrc_tweaks @@ -3,6 +3,10 @@ ignore+ = ,.git,.tox,migrations,node_modules,.pycharm_helpers init-hook="import sys; sys.path.extend(['lms/djangoapps', 'cms/djangoapps', 'common/djangoapps'])" +[MESSAGES CONTROL] +# Disable unicode-format-string until we can agree to turn it on. +disable+ = ,unicode-format-string + [BASIC] attr-rgx = [a-z_][a-z0-9_]{2,40}$ argument-rgx = [a-z_][a-z0-9_]{2,40}$ diff --git a/requirements/edx/testing.in b/requirements/edx/testing.in index 9834405ee3..329ffe9788 100644 --- a/requirements/edx/testing.in +++ b/requirements/edx/testing.in @@ -23,7 +23,7 @@ bok-choy # Framework for browser automation tests, based on sel cssselect # Used to extract HTML fragments via CSS selectors in 2 test cases and pyquery ddt # Run a test case multiple times with different input; used in many, many of our tests edx-i18n-tools>=0.4.6 # Commands for developers and translators to extract, compile and validate translations -edx-lint==0.6.0 # pylint extensions for Open edX repositories +edx-lint==1.0.0 # pylint extensions for Open edX repositories factory_boy==2.8.1 # Library for creating test fixtures, used in many tests freezegun # Allows tests to mock the output of assorted datetime module functions httpretty # Library for mocking HTTP requests, used in many tests From 785fb3ffe9c2065d2d630ddb10c401d63a49452e Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 11 Dec 2018 10:25:43 -0500 Subject: [PATCH 2/3] $ edx_lint write .editorconfig --- .editorconfig | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index 84c59df1a6..84b955c018 100644 --- a/.editorconfig +++ b/.editorconfig @@ -58,11 +58,26 @@ insert_final_newline = true charset = utf-8 indent_style = space indent_size = 4 +max_line_length = 120 +trim_trailing_whitespace = true [{Makefile, *.mk}] indent_style = tab +indent_size = 8 -[{*.yml, *.yaml, *.json}] +[*.{yml,yaml,json}] indent_size = 2 -# e2776282f95423f221b17c09c4888883be77b437 +[*.js] +indent_size = 2 + +[*.diff] +trim_trailing_whitespace = false + +[.git/*] +trim_trailing_whitespace = false + +[*.rst] +max_line_length = 79 + +# a699cc442902ab24adc720ac080c00e9ee72f728 From d66fdc34c4274268c7568c6666bade853da76561 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 14 Dec 2018 11:38:09 -0500 Subject: [PATCH 3/3] $ make upgrade --- requirements/edx/base.txt | 2 +- requirements/edx/coverage.txt | 2 +- requirements/edx/development.txt | 4 ++-- requirements/edx/testing.txt | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index dd94387ee2..774ee417cb 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -190,7 +190,7 @@ pycontracts==1.7.1 pycountry==1.20 pycparser==2.19 pycryptodomex==3.4.7 -pygments==2.3.0 +pygments==2.3.1 pygraphviz==1.1 pyjwkest==1.3.2 pyjwt==1.5.2 diff --git a/requirements/edx/coverage.txt b/requirements/edx/coverage.txt index 8ff966dba7..a632cc4a62 100644 --- a/requirements/edx/coverage.txt +++ b/requirements/edx/coverage.txt @@ -10,5 +10,5 @@ inflect==2.1.0 # via jinja2-pluralize jinja2-pluralize==0.3.0 # via diff-cover jinja2==2.10 # via diff-cover, jinja2-pluralize markupsafe==1.1.0 # via jinja2 -pygments==2.3.0 # via diff-cover +pygments==2.3.1 # via diff-cover six==1.11.0 # via diff-cover diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 5989d2497f..524159d4cd 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -139,7 +139,7 @@ edx-django-utils==1.0.3 edx-drf-extensions==2.0.1 edx-enterprise==1.1.2 edx-i18n-tools==0.4.6 -edx-lint==0.6.0 +edx-lint==1.0.0 edx-milestones==0.1.13 edx-oauth2-provider==1.2.2 edx-opaque-keys[django]==0.4.4 @@ -249,7 +249,7 @@ pycparser==2.19 pycryptodomex==3.4.7 pydispatcher==2.0.5 pyflakes==2.0.0 -pygments==2.3.0 +pygments==2.3.1 pygraphviz==1.1 pyinotify==0.9.6 pyjwkest==1.3.2 diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index 636be8d449..908ad711a7 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -134,7 +134,7 @@ edx-django-utils==1.0.3 edx-drf-extensions==2.0.1 edx-enterprise==1.1.2 edx-i18n-tools==0.4.6 -edx-lint==0.6.0 +edx-lint==1.0.0 edx-milestones==0.1.13 edx-oauth2-provider==1.2.2 edx-opaque-keys[django]==0.4.4 @@ -239,7 +239,7 @@ pycparser==2.19 pycryptodomex==3.4.7 pydispatcher==2.0.5 # via scrapy pyflakes==2.0.0 # via flake8 -pygments==2.3.0 +pygments==2.3.1 pygraphviz==1.1 pyjwkest==1.3.2 pyjwt==1.5.2