diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9266d6c..beac6bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false max-parallel: 5 matrix: - python-version: [3.7, 3.8, 3.9, '3.10'] + python-version: [3.7, 3.8, 3.9, '3.10', '3.11'] steps: - name: Checkout code 🛎️ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1d7e726..648d524 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: additional_dependencies: - mdformat-toc - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.3.1 + rev: v1.4.0 hooks: - id: forbid-crlf - id: remove-crlf diff --git a/README.md b/README.md index bcf257f..2ec4e61 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ into separate repos: ```yaml - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.3.1 + rev: v1.4.0 hooks: - id: forbid-crlf - id: remove-crlf diff --git a/setup.py b/setup.py index 31d1a7b..3ebbdf2 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ name='pre-commit-hooks', description='Some out-of-the-box hooks for pre-commit', url='https://github.com/Lucas-C/pre-commit-hooks', - version='1.3.1', + version='1.4.0', author='Lucas Cimon', author_email='lucas.cimon@gmail.com', @@ -17,6 +17,7 @@ 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', ], diff --git a/tests/remove_tabs_test.py b/tests/remove_tabs_test.py index 3dca9e1..8be119e 100644 --- a/tests/remove_tabs_test.py +++ b/tests/remove_tabs_test.py @@ -6,8 +6,10 @@ @pytest.mark.parametrize( ('input_s', 'expected'), ( - ('foo \t\nbar', 'foo \nbar'), - ('bar\n\tbaz\n', 'bar\n baz\n'), + ('\tfoo', ' foo'), + ('foo\t', 'foo '), + ('foo \t', 'foo '), + ('foo \t \t\t bar', 'foo bar'), ('No leading\ttab\n\tleading\ttab\n \tSpace then\tTab\n', 'No leading tab\n leading tab\n Space then Tab\n'), ('Tabs\tbetween\tevery\tword\tin\tthe\tline.\n', 'Tabs between every word in the line.\n',), ('Space \tthen \ttab \tbetween \tevery \tword \tin \tthe \tline.',