diff options
-rw-r--r-- | .pre-commit-config.yaml | 2 | ||||
-rw-r--r-- | identify/extensions.py | 4 | ||||
-rw-r--r-- | setup.cfg | 2 | ||||
-rw-r--r-- | tests/identify_test.py | 2 |
4 files changed, 8 insertions, 2 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c3f3146..d6b54dd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,6 +37,6 @@ repos: - id: flake8 exclude: ^identify/vendor/licenses\.py$ - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.6.1 + rev: v1.7.1 hooks: - id: mypy diff --git a/identify/extensions.py b/identify/extensions.py index 544af49..585d214 100644 --- a/identify/extensions.py +++ b/identify/extensions.py @@ -7,6 +7,7 @@ EXTENSIONS = { 'apinotes': {'text', 'apinotes'}, 'asar': {'binary', 'asar'}, 'avif': {'binary', 'image', 'avif'}, + 'avsc': {'text', 'avro-schema'}, 'bash': {'text', 'shell', 'bash'}, 'bat': {'text', 'batch'}, 'bats': {'text', 'shell', 'bash', 'bats'}, @@ -196,6 +197,7 @@ EXTENSIONS = { 'py': {'text', 'python'}, 'pyi': {'text', 'pyi'}, 'pyproj': {'text', 'xml', 'pyproj'}, + 'pyt': {'text', 'python'}, 'pyx': {'text', 'cython'}, 'pyz': {'binary', 'pyz'}, 'pyzw': {'binary', 'pyz'}, @@ -328,6 +330,7 @@ NAMES = { '.prettierignore': {'text', 'gitignore', 'prettierignore'}, '.pypirc': EXTENSIONS['ini'] | {'pypirc'}, '.rstcheck.cfg': EXTENSIONS['ini'], + '.salt-lint': EXTENSIONS['yaml'] | {'salt-lint'}, '.yamllint': EXTENSIONS['yaml'] | {'yamllint'}, '.zlogin': EXTENSIONS['zsh'], '.zlogout': EXTENSIONS['zsh'], @@ -371,6 +374,7 @@ NAMES = { 'setup.cfg': EXTENSIONS['ini'], 'sys.config': EXTENSIONS['erl'], 'sys.config.src': EXTENSIONS['erl'], + 'Vagrantfile': EXTENSIONS['rb'], 'WORKSPACE': EXTENSIONS['bzl'], 'wscript': EXTENSIONS['py'], } @@ -1,6 +1,6 @@ [metadata] name = identify -version = 2.5.31 +version = 2.5.33 description = File identification library for Python long_description = file: README.md long_description_content_type = text/markdown diff --git a/tests/identify_test.py b/tests/identify_test.py index ac458df..bb8aba5 100644 --- a/tests/identify_test.py +++ b/tests/identify_test.py @@ -151,6 +151,7 @@ def test_tags_from_path_plist_text(tmpdir): @pytest.mark.parametrize( ('filename', 'expected'), ( + ('.salt-lint', {'text', 'salt-lint', 'yaml'}), ('test.py', {'text', 'python'}), ('test.mk', {'text', 'makefile'}), ('Makefile', {'text', 'makefile'}), @@ -170,6 +171,7 @@ def test_tags_from_path_plist_text(tmpdir): ('build.jenkinsfile', {'text', 'groovy', 'jenkins'}), ('meson.build', {'text', 'meson'}), ('meson_options.txt', {'text', 'plain-text', 'meson'}), + ('Vagrantfile', {'text', 'ruby'}), # does not set binary / text ('f.plist', {'plist'}), |