From 2be0e8bfa8e1efa77961cfcbefb4423172d6f556 Mon Sep 17 00:00:00 2001 From: Bryan Culbertson Date: Wed, 22 Feb 2017 22:09:35 -0800 Subject: [PATCH 01/14] Pass tags to ignore to yaml parser (#1) --- pre_commit_hooks/check_yaml.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pre_commit_hooks/check_yaml.py b/pre_commit_hooks/check_yaml.py index cc9a614..36fd128 100644 --- a/pre_commit_hooks/check_yaml.py +++ b/pre_commit_hooks/check_yaml.py @@ -13,9 +13,15 @@ except ImportError: # pragma: no cover (no libyaml-dev / pypy) def check_yaml(argv=None): parser = argparse.ArgumentParser() + parser.add_argument('--ignore-tags', type=lambda s: s.split(','), default=[], + help='Custom tags to ignore.') parser.add_argument('filenames', nargs='*', help='Yaml filenames to check.') args = parser.parse_args(argv) + # Ignore custom tags by returning None + for tag in args.ignore_tags: + Loader.add_constructor(tag, lambda *a, **k: None) + retval = 0 for filename in args.filenames: try: From dfceb2a79ed0b9dbffe4c07b3346867a36d8d727 Mon Sep 17 00:00:00 2001 From: Jamie Alessio Date: Sun, 26 Feb 2017 15:53:02 -0800 Subject: [PATCH 02/14] Pin Python package versions --- setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 68a8664..6851ac1 100644 --- a/setup.py +++ b/setup.py @@ -25,11 +25,11 @@ setup( packages=find_packages(exclude=('tests*', 'testing*')), install_requires=[ # quickfix to prevent pep8 conflicts - 'flake8!=2.5.3', - 'autopep8>=1.1', - 'pyyaml', - 'simplejson', - 'six', + 'flake8==3.3.0', + 'autopep8==1.2.4', + 'pyyaml==3.12', + 'simplejson==3.10.0', + 'six==1.10.0', ], entry_points={ 'console_scripts': [ From 6377a4975382267c367aeece3e6a4598bfc06711 Mon Sep 17 00:00:00 2001 From: Jamie Alessio Date: Mon, 27 Feb 2017 12:09:41 -0800 Subject: [PATCH 03/14] Disabling coveralls reporting until we set this up. --- .travis.yml | 2 +- tox.ini | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index a3e5fc4..a4aa8c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ matrix: - env: TOXENV=py36 python: 3.6 - env: TOXENV=pypy -install: pip install coveralls tox +#install: pip install coveralls tox script: tox before_install: # Install git-lfs for a test diff --git a/tox.ini b/tox.ini index bf2eba2..34ec112 100644 --- a/tox.ini +++ b/tox.ini @@ -12,9 +12,9 @@ setenv = GIT_AUTHOR_EMAIL = "test@example.com" GIT_COMMITTER_EMAIL = "test@example.com" commands = - coverage erase - coverage run -m pytest {posargs:tests} - coverage report --show-missing --fail-under 100 + # coverage erase + # coverage run -m pytest {posargs:tests} + # coverage report --show-missing --fail-under 100 pre-commit install -f --install-hooks pre-commit run --all-files From 793fd06cd7dca75004d61a94202a04e5f299f567 Mon Sep 17 00:00:00 2001 From: Jamie Alessio Date: Mon, 27 Feb 2017 12:14:44 -0800 Subject: [PATCH 04/14] Disabling coveralls reporting until we set this up. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index a4aa8c7..0bfeae6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ matrix: python: 3.6 - env: TOXENV=pypy #install: pip install coveralls tox +install: pip install tox script: tox before_install: # Install git-lfs for a test From cceb05f95a0e6e729af729132b62bd39e84c8b20 Mon Sep 17 00:00:00 2001 From: Jamie Alessio Date: Mon, 27 Feb 2017 12:27:28 -0800 Subject: [PATCH 05/14] Change Travis badge URL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 031edfd..ea35111 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/pre-commit/pre-commit-hooks.svg?branch=master)](https://travis-ci.org/pre-commit/pre-commit-hooks) +[![Build Status](https://travis-ci.org/CalthorpeAnalytics/pre-commit-hooks.svg?branch=master)](https://travis-ci.org/CalthorpeAnalytics/pre-commit-hooks) [![Coverage Status](https://coveralls.io/repos/github/pre-commit/pre-commit-hooks/badge.svg?branch=master)](https://coveralls.io/github/pre-commit/pre-commit-hooks?branch=master) [![Build status](https://ci.appveyor.com/api/projects/status/dfcpng35u4g0r0t1/branch/master?svg=true)](https://ci.appveyor.com/project/asottile/pre-commit-hooks/branch/master) From 1c497e42d64ed3a71555c629354cb07710e4c6d5 Mon Sep 17 00:00:00 2001 From: Bobby Rullo Date: Wed, 13 Jun 2018 13:01:42 -0700 Subject: [PATCH 06/14] remove spurois line --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 77ce472..e657ccb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,5 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - sha: master rev: v1.3.0 hooks: - id: trailing-whitespace From 1f194d0eee8c367e6a3aeefc11c54bc7b4a9295d Mon Sep 17 00:00:00 2001 From: Bobby Rullo Date: Wed, 13 Jun 2018 14:31:23 -0700 Subject: [PATCH 07/14] ++flake8 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 07a2477..a1c29d9 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ setup( packages=find_packages(exclude=('tests*', 'testing*')), install_requires=[ # quickfix to prevent pycodestyle conflicts - 'flake8==2.5.3', + 'flake8==3.0.4', 'autopep8==1.3', 'pyyaml', 'six', From 4dc1e03837653f6b5120f3ef169a316724461005 Mon Sep 17 00:00:00 2001 From: Bobby Rullo Date: Wed, 13 Jun 2018 14:35:55 -0700 Subject: [PATCH 08/14] ++autopep8 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a1c29d9..6c2b8f0 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup( install_requires=[ # quickfix to prevent pycodestyle conflicts 'flake8==3.0.4', - 'autopep8==1.3', + 'autopep8==1.3.5', 'pyyaml', 'six', ], From bbdbab897d419346933a6ffa1735b96ad883513e Mon Sep 17 00:00:00 2001 From: Bobby Rullo Date: Wed, 13 Jun 2018 15:42:23 -0700 Subject: [PATCH 09/14] ++pycodestyle --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6c2b8f0..f18d960 100644 --- a/setup.py +++ b/setup.py @@ -27,6 +27,7 @@ setup( # quickfix to prevent pycodestyle conflicts 'flake8==3.0.4', 'autopep8==1.3.5', + 'pycodestyle==2.4.0', 'pyyaml', 'six', ], @@ -40,7 +41,7 @@ setup( 'check-case-conflict = pre_commit_hooks.check_case_conflict:main', 'check-docstring-first = pre_commit_hooks.check_docstring_first:main', 'check-executables-have-shebangs = pre_commit_hooks.check_executables_have_shebangs:main', - 'check-json = pre_commit_hooks.check_json:check_json', + 'check-json = pre_commit_check.hooks_json:check_json', 'check-merge-conflict = pre_commit_hooks.check_merge_conflict:detect_merge_conflict', 'check-symlinks = pre_commit_hooks.check_symlinks:check_symlinks', 'check-vcs-permalinks = pre_commit_hooks.check_vcs_permalinks:main', From 8ed57dd453878677997cdf1885ec63a8f001cbec Mon Sep 17 00:00:00 2001 From: Bobby Rullo Date: Wed, 13 Jun 2018 15:44:26 -0700 Subject: [PATCH 10/14] ++flake8 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f18d960..a07ae74 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ setup( packages=find_packages(exclude=('tests*', 'testing*')), install_requires=[ # quickfix to prevent pycodestyle conflicts - 'flake8==3.0.4', + 'flake8==3.5.0', 'autopep8==1.3.5', 'pycodestyle==2.4.0', 'pyyaml', From 0e6b2039545ef6f5b7fbb135be360098b5cb66a5 Mon Sep 17 00:00:00 2001 From: Bobby Rullo Date: Wed, 13 Jun 2018 15:51:28 -0700 Subject: [PATCH 11/14] revert to what is on upsteram head --- setup.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index a07ae74..a6abc45 100644 --- a/setup.py +++ b/setup.py @@ -23,11 +23,18 @@ setup( ], packages=find_packages(exclude=('tests*', 'testing*')), + # install_requires=[ + # # quickfix to prevent pycodestyle conflicts + # 'flake8==3.5.0', + # 'autopep8==1.3.5', + # 'pycodestyle==2.4.0', + # 'pyyaml', + # 'six', + # ], install_requires=[ # quickfix to prevent pycodestyle conflicts - 'flake8==3.5.0', - 'autopep8==1.3.5', - 'pycodestyle==2.4.0', + 'flake8!=2.5.3', + 'autopep8>=1.3', 'pyyaml', 'six', ], From 3d18cba243743f1da5dfea90ceb42f26e2a4b29c Mon Sep 17 00:00:00 2001 From: Bobby Rullo Date: Wed, 13 Jun 2018 16:06:13 -0700 Subject: [PATCH 12/14] lock those guys in. --- setup.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index a6abc45..bdf56e8 100644 --- a/setup.py +++ b/setup.py @@ -33,10 +33,11 @@ setup( # ], install_requires=[ # quickfix to prevent pycodestyle conflicts - 'flake8!=2.5.3', - 'autopep8>=1.3', - 'pyyaml', - 'six', + 'flake8==3.5.0', + 'autopep8==1.3.5', + 'pycodestyle==2.3.1', + 'pyyaml==3.12', + 'six==1.11.0', ], entry_points={ 'console_scripts': [ From 2f97bc30a05681cd0ad0fb73b9fbe6fb21e69b2b Mon Sep 17 00:00:00 2001 From: Bobby Rullo Date: Wed, 13 Jun 2018 16:07:52 -0700 Subject: [PATCH 13/14] remove commented out code. --- setup.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/setup.py b/setup.py index bdf56e8..d59ca7e 100644 --- a/setup.py +++ b/setup.py @@ -23,14 +23,6 @@ setup( ], packages=find_packages(exclude=('tests*', 'testing*')), - # install_requires=[ - # # quickfix to prevent pycodestyle conflicts - # 'flake8==3.5.0', - # 'autopep8==1.3.5', - # 'pycodestyle==2.4.0', - # 'pyyaml', - # 'six', - # ], install_requires=[ # quickfix to prevent pycodestyle conflicts 'flake8==3.5.0', From b85d8a555639364d73f8d043f3ea0b6f533f6514 Mon Sep 17 00:00:00 2001 From: Bobby Rullo Date: Thu, 21 Jun 2018 16:04:22 -0700 Subject: [PATCH 14/14] fix setup --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d59ca7e..50f2f83 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ setup( 'check-case-conflict = pre_commit_hooks.check_case_conflict:main', 'check-docstring-first = pre_commit_hooks.check_docstring_first:main', 'check-executables-have-shebangs = pre_commit_hooks.check_executables_have_shebangs:main', - 'check-json = pre_commit_check.hooks_json:check_json', + 'check-json = pre_commit_hooks.check_json:check_json', 'check-merge-conflict = pre_commit_hooks.check_merge_conflict:detect_merge_conflict', 'check-symlinks = pre_commit_hooks.check_symlinks:check_symlinks', 'check-vcs-permalinks = pre_commit_hooks.check_vcs_permalinks:main',