1
0
Fork 0

Merging upstream version 2.5.33.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 05:37:29 +01:00
parent debb2d98f8
commit 542e2de114
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
4 changed files with 8 additions and 2 deletions

View file

@ -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

View file

@ -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'],
}

View file

@ -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

View file

@ -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'}),