diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 989777da..aa11be69 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ - repo: git@github.com:pre-commit/pre-commit-hooks - sha: 84fbf05803f25fea2ad4a9509b3666840bf580b4 + sha: ca93f6834f2afc8a8f7de46c0e02076419077c7a hooks: - id: trailing-whitespace files: \.(py|sh|yaml)$ @@ -11,13 +11,13 @@ files: \.py$ - id: name-tests-test files: tests/.+\.py$ - - id: pyflakes + - id: flake8 files: \.py$ + args: [--max-line-length=131] - repo: git@github.com:pre-commit/pre-commit - sha: 3cfc49b522dee27cdcce83781cd874c5638ad6c1 + sha: 2c7ec7a744908896af3afd140346e690deca7782 hooks: - id: validate_config files: ^\.pre-commit-config.yaml$ - id: validate_manifest files: ^hooks.yaml$ - exclude: ^$ diff --git a/testing/auto_namedtuple.py b/testing/auto_namedtuple.py index b585e6da..0841094e 100644 --- a/testing/auto_namedtuple.py +++ b/testing/auto_namedtuple.py @@ -1,5 +1,6 @@ import collections + def auto_namedtuple(classname='auto_namedtuple', **kwargs): """Returns an automatic namedtuple object. diff --git a/testing/resources/python_hooks_repo/foo/main.py b/testing/resources/python_hooks_repo/foo/main.py index 5be7cd29..23d20014 100644 --- a/testing/resources/python_hooks_repo/foo/main.py +++ b/testing/resources/python_hooks_repo/foo/main.py @@ -1,5 +1,6 @@ import sys + def func(): print repr(sys.argv[1:]) print 'Hello World' diff --git a/testing/util.py b/testing/util.py index 90459952..50390cbe 100644 --- a/testing/util.py +++ b/testing/util.py @@ -28,6 +28,7 @@ def copy_tree_to_path(src_dir, dest_dir): else: shutil.copy(srcname, destname) + def is_valid_according_to_schema(obj, schema): try: jsonschema.validate(obj, schema) diff --git a/tox.ini b/tox.ini index 41db3e3d..58a63d8c 100644 --- a/tox.ini +++ b/tox.ini @@ -10,8 +10,8 @@ commands = coverage erase coverage run -m pytest {posargs:tests} coverage report --show-missing --fail-under 93 - flake8 {[tox]project} tests setup.py -# pylint {[tox]project} tests setup.py + flake8 {[tox]project} testing tests setup.py +# pylint {[tox]project} testing tests setup.py [testenv:venv] envdir = venv-{[tox]project}