Update hooks
This commit is contained in:
parent
5656e3cc30
commit
f138e3451b
|
@ -4,7 +4,6 @@
|
|||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: autopep8-wrapper
|
||||
args: ['-i', '--ignore=E265,E309,E501']
|
||||
- id: check-docstring-first
|
||||
- id: check-json
|
||||
- id: check-added-large-files
|
||||
|
@ -14,11 +13,11 @@
|
|||
- id: requirements-txt-fixer
|
||||
- id: flake8
|
||||
- repo: git@github.com:pre-commit/pre-commit
|
||||
sha: 645838cb514583249478e347aa80a0af743edace
|
||||
sha: 8dba3281d5051060755459dcf88e28fc26c27526
|
||||
hooks:
|
||||
- id: validate_config
|
||||
- id: validate_manifest
|
||||
- repo: git@github.com:asottile/reorder_python_imports
|
||||
sha: ea9fa14a757bb210d849de5af8f8ba2c9744027a
|
||||
sha: 3d86483455ab5bd06cc1069fdd5ac57be5463f10
|
||||
hooks:
|
||||
- id: reorder-python-imports
|
||||
|
|
|
@ -29,14 +29,12 @@ def test_fixes_trailing_whitespace(tmpdir):
|
|||
|
||||
|
||||
# filename, expected input, expected output
|
||||
# pylint: disable=bad-whitespace
|
||||
MD_TESTS_1 = (
|
||||
('foo.md', 'foo \nbar \n ', 'foo \nbar\n\n'),
|
||||
('bar.Markdown', 'bar \nbaz\t\n\t\n', 'bar \nbaz\n\n'),
|
||||
('.md', 'baz \nquux \t\n\t\n', 'baz\nquux\n\n'),
|
||||
('txt', 'foo \nbaz \n\t\n', 'foo\nbaz\n\n'),
|
||||
('foo.md', 'foo \nbar \n ', 'foo \nbar\n\n'),
|
||||
('bar.Markdown', 'bar \nbaz\t\n\t\n', 'bar \nbaz\n\n'),
|
||||
('.md', 'baz \nquux \t\n\t\n', 'baz\nquux\n\n'),
|
||||
('txt', 'foo \nbaz \n\t\n', 'foo\nbaz\n\n'),
|
||||
)
|
||||
# pylint: enable=bad-whitespace
|
||||
|
||||
|
||||
@pytest.mark.parametrize(('filename', 'input_s', 'output'), MD_TESTS_1)
|
||||
|
@ -51,15 +49,13 @@ def test_fixes_trailing_markdown_whitespace(filename, input_s, output, tmpdir):
|
|||
|
||||
|
||||
# filename, expected input, expected output
|
||||
# pylint: disable=bad-whitespace
|
||||
MD_TESTS_2 = (
|
||||
('foo.txt', 'foo \nbar \n \n', 'foo \nbar\n\n'),
|
||||
('bar.Markdown', 'bar \nbaz\t\n\t\n', 'bar \nbaz\n\n'),
|
||||
('bar.MD', 'bar \nbaz\t \n\t\n', 'bar \nbaz\n\n'),
|
||||
('.txt', 'baz \nquux \t\n\t\n', 'baz\nquux\n\n'),
|
||||
('txt', 'foo \nbaz \n\t\n', 'foo\nbaz\n\n'),
|
||||
('foo.txt', 'foo \nbar \n \n', 'foo \nbar\n\n'),
|
||||
('bar.Markdown', 'bar \nbaz\t\n\t\n', 'bar \nbaz\n\n'),
|
||||
('bar.MD', 'bar \nbaz\t \n\t\n', 'bar \nbaz\n\n'),
|
||||
('.txt', 'baz \nquux \t\n\t\n', 'baz\nquux\n\n'),
|
||||
('txt', 'foo \nbaz \n\t\n', 'foo\nbaz\n\n'),
|
||||
)
|
||||
# pylint: enable=bad-whitespace
|
||||
|
||||
|
||||
@pytest.mark.parametrize(('filename', 'input_s', 'output'), MD_TESTS_2)
|
||||
|
@ -75,12 +71,10 @@ def test_markdown_linebreak_ext_opt(filename, input_s, output, tmpdir):
|
|||
|
||||
|
||||
# filename, expected input, expected output
|
||||
# pylint: disable=bad-whitespace
|
||||
MD_TESTS_3 = (
|
||||
('foo.baz', 'foo \nbar \n ', 'foo \nbar\n\n'),
|
||||
('bar', 'bar \nbaz\t\n\t\n', 'bar \nbaz\n\n'),
|
||||
('foo.baz', 'foo \nbar \n ', 'foo \nbar\n\n'),
|
||||
('bar', 'bar \nbaz\t\n\t\n', 'bar \nbaz\n\n'),
|
||||
)
|
||||
# pylint: enable=bad-whitespace
|
||||
|
||||
|
||||
@pytest.mark.parametrize(('filename', 'input_s', 'output'), MD_TESTS_3)
|
||||
|
@ -107,12 +101,10 @@ def test_markdown_linebreak_ext_badopt(arg):
|
|||
|
||||
|
||||
# filename, expected input, expected output
|
||||
# pylint: disable=bad-whitespace
|
||||
MD_TESTS_4 = (
|
||||
('bar.md', 'bar \nbaz\t \n\t\n', 'bar\nbaz\n\n'),
|
||||
('bar.markdown', 'baz \nquux \n', 'baz\nquux\n'),
|
||||
('bar.md', 'bar \nbaz\t \n\t\n', 'bar\nbaz\n\n'),
|
||||
('bar.markdown', 'baz \nquux \n', 'baz\nquux\n'),
|
||||
)
|
||||
# pylint: enable=bad-whitespace
|
||||
|
||||
|
||||
@pytest.mark.parametrize(('filename', 'input_s', 'output'), MD_TESTS_4)
|
||||
|
|
Loading…
Reference in New Issue