From 23483456e9017d893e6438d10238d1ca23abf4a4 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Tue, 30 Oct 2018 12:56:31 -0500 Subject: [PATCH 01/12] Remove python2 imports from isort --- isort.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/isort.cfg b/isort.cfg index c18d159..c0e547d 100644 --- a/isort.cfg +++ b/isort.cfg @@ -22,4 +22,3 @@ default_section=THIRDPARTY known_first_party=readthedocs,readthedocsinc known_third_party=mock,builtins sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER -add_imports=from __future__ import division, from __future__ import print_function, from __future__ import unicode_literals From 07df56530662a94f7e1a7807b85d073cdeafb82d Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Tue, 30 Oct 2018 12:57:02 -0500 Subject: [PATCH 02/12] Typo --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index ffa7ef9..829e72a 100644 --- a/README.rst +++ b/README.rst @@ -16,7 +16,7 @@ To install:: Setup ----- -The release proces automatically handles updating the changelog and incrementing +The release process automatically handles updating the changelog and incrementing a version in setup.cfg. You'll need a few extra piece to make this work in each repository: a version to manipulate and information on the repo for changelog automation. From 6336ec72a1c284464a6bcd7752ff81fd9a5ce1b9 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Tue, 30 Oct 2018 14:52:45 -0500 Subject: [PATCH 03/12] Remove imports --- isort.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/isort.cfg b/isort.cfg index c0e547d..0064884 100644 --- a/isort.cfg +++ b/isort.cfg @@ -22,3 +22,4 @@ default_section=THIRDPARTY known_first_party=readthedocs,readthedocsinc known_third_party=mock,builtins sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER +remove_imports=from __future__ import division, from __future__ import print_function, from __future__ import unicode_literals From e979170210a541bf2234f62f683f00a9e3629dac Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Tue, 8 Jan 2019 20:43:40 +0100 Subject: [PATCH 04/12] Add more imports that we want to remove when deprecating Py2 --- isort.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/isort.cfg b/isort.cfg index 0064884..5310225 100644 --- a/isort.cfg +++ b/isort.cfg @@ -20,6 +20,6 @@ force_alphabetical_sort=False default_section=THIRDPARTY known_first_party=readthedocs,readthedocsinc -known_third_party=mock,builtins sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER -remove_imports=from __future__ import division, from __future__ import print_function, from __future__ import unicode_literals +remove_imports=from __future__ import division, from __future__ import print_function, from __future__ import unicode_literals, from __future__ import absolute_import, from builtins import str, from builtins import object, from builtins import next, from builtins import range, from builtins import open, import six + From 3df93418a90cc4b59b00434f9c7a08d80d6c30a4 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Tue, 8 Jan 2019 20:56:35 +0100 Subject: [PATCH 05/12] Update pre-commit configuration --- pre-commit-config.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pre-commit-config.yaml b/pre-commit-config.yaml index badfb2f..edce084 100644 --- a/pre-commit-config.yaml +++ b/pre-commit-config.yaml @@ -1,9 +1,9 @@ -exclude: 'migrations|settings|scripts|tests' +exclude: '^$|migrations|settings|scripts|tests' fail_fast: false repos: - repo: https://github.com/asottile/add-trailing-comma - rev: v0.7.0 + rev: v0.7.1 hooks: - id: add-trailing-comma @@ -26,6 +26,7 @@ repos: hooks: - id: python-import-sorter args: ['--silent-overwrite'] + exclude: 'wsgi.py' - repo: git@github.com:humitos/mirrors-docformatter.git rev: v1.0 @@ -34,7 +35,7 @@ repos: args: ['--in-place', '--wrap-summaries=80', '--wrap-descriptions=80', '--pre-summary-newline'] - repo: git@github.com:pre-commit/pre-commit-hooks - rev: v1.4.0 + rev: v2.1.0 hooks: # Disabled because yapf is better for our purpose # - id: autopep8-wrapper @@ -70,7 +71,7 @@ repos: exclude: 'test_oauth.py' - repo: git://github.com/guykisel/prospector-mirror - rev: b27f281eb9398fc8504415d7fbdabf119ea8c5e1 + rev: 7ff847e779347033ebbd9e3b88279e7f3a998b45 hooks: - id: prospector # https://github.com/pre-commit/pre-commit/issues/178 From 57ba2eae5c0cc818f0cd1a23b6f8998a58a6f101 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Tue, 8 Jan 2019 21:37:23 +0100 Subject: [PATCH 06/12] Test are already excluded globally --- pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/pre-commit-config.yaml b/pre-commit-config.yaml index edce084..0801796 100644 --- a/pre-commit-config.yaml +++ b/pre-commit-config.yaml @@ -68,7 +68,6 @@ repos: # 'flake8-debugger', # 'flake8-todo', ] - exclude: 'test_oauth.py' - repo: git://github.com/guykisel/prospector-mirror rev: 7ff847e779347033ebbd9e3b88279e7f3a998b45 From 890625b9bfca1981a3f68a9fb7d168bba714421d Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Tue, 8 Jan 2019 21:50:45 +0100 Subject: [PATCH 07/12] Exclude static for end-of-file-fixer --- pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/pre-commit-config.yaml b/pre-commit-config.yaml index 0801796..2b1fb64 100644 --- a/pre-commit-config.yaml +++ b/pre-commit-config.yaml @@ -43,6 +43,7 @@ repos: - id: debug-statements - id: double-quote-string-fixer - id: end-of-file-fixer + exclude: 'static' - id: fix-encoding-pragma - id: check-merge-conflict - id: check-symlinks From a7c1ae97036edd92c4605197394c3c79a89d9cd1 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 9 Jan 2019 12:21:44 +0100 Subject: [PATCH 08/12] Use official docformatter repository instead my mirror --- pre-commit-config.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pre-commit-config.yaml b/pre-commit-config.yaml index 2b1fb64..e38504c 100644 --- a/pre-commit-config.yaml +++ b/pre-commit-config.yaml @@ -28,8 +28,9 @@ repos: args: ['--silent-overwrite'] exclude: 'wsgi.py' -- repo: git@github.com:humitos/mirrors-docformatter.git - rev: v1.0 +- repo: git@github.com:myint/docformatter.git + # Latest release v1.0 does not contains the .pre-commit-hooks.yaml file + rev: 7cb0c50b674680e28cae8c4c1add6b43ed2ccb91 hooks: - id: docformatter args: ['--in-place', '--wrap-summaries=80', '--wrap-descriptions=80', '--pre-summary-newline'] From bb9f74e7db578fb575bb3a1f48a4ee6c3bc2a491 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 9 Jan 2019 12:25:59 +0100 Subject: [PATCH 09/12] Exclude D202 --- prospector.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/prospector.yml b/prospector.yml index b28d77b..ed96f22 100644 --- a/prospector.yml +++ b/prospector.yml @@ -49,13 +49,14 @@ pep257: - D100 # Missing docstring in public module - D101 # Missing docstring in public class - D102 # Missing docstring in public method - + - D104 - D105 + - D106 # Missing docstring in public nested class + - D107 # Missing docstring in __init__ + + - D202 # No blank lines allowed after function docstring (found 1) - D211 - - D104 - D212 # Multi-line docstring summary should start at the first line - - D107 # Missing docstring in __init__ - - D106 # Missing docstring in public nested class # pydocstyle - D403 # First word of the first line should be properly capitalized ('Github', not 'GitHub') From 0f490f74b0d23ded4d6463af86a607ea15d6e900 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 9 Jan 2019 13:00:58 +0100 Subject: [PATCH 10/12] Remove futures for yapf since it's only for Py2 --- pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/pre-commit-config.yaml b/pre-commit-config.yaml index e38504c..27c08f2 100644 --- a/pre-commit-config.yaml +++ b/pre-commit-config.yaml @@ -17,7 +17,6 @@ repos: rev: v0.25.0 hooks: - id: yapf - additional_dependencies: ['futures'] args: ['--style=.style.yapf', '--parallel', '--in-place'] # When calling `pre-commit autoupdate`, this repo needs to be commented because it fails From 8712295c9d5acf4570350f22849cb705f522ea60 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 9 Jan 2019 13:07:35 +0100 Subject: [PATCH 11/12] Disable auto add trailing comma This is causing some problems. --- pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pre-commit-config.yaml b/pre-commit-config.yaml index 27c08f2..31430a2 100644 --- a/pre-commit-config.yaml +++ b/pre-commit-config.yaml @@ -2,10 +2,10 @@ exclude: '^$|migrations|settings|scripts|tests' fail_fast: false repos: -- repo: https://github.com/asottile/add-trailing-comma - rev: v0.7.1 - hooks: - - id: add-trailing-comma +# - repo: https://github.com/asottile/add-trailing-comma +# rev: v0.7.1 +# hooks: +# - id: add-trailing-comma - repo: git@github.com:humitos/mirrors-autoflake.git rev: v1.1 From 2c42860327916ec66f3aed7cf3d7bab809438ab4 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Mon, 21 Jan 2019 18:22:14 +0100 Subject: [PATCH 12/12] We only want to exclude migrations|tests on yapf --- pre-commit-config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pre-commit-config.yaml b/pre-commit-config.yaml index 31430a2..2b4f7ec 100644 --- a/pre-commit-config.yaml +++ b/pre-commit-config.yaml @@ -1,4 +1,4 @@ -exclude: '^$|migrations|settings|scripts|tests' +exclude: '^$|settings|scripts' fail_fast: false repos: @@ -17,6 +17,7 @@ repos: rev: v0.25.0 hooks: - id: yapf + exclude: 'migrations|tests' args: ['--style=.style.yapf', '--parallel', '--in-place'] # When calling `pre-commit autoupdate`, this repo needs to be commented because it fails