From 9954331ebf25e9b81dfc7aad2f45e5d8750acfff Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 13 Feb 2025 05:41:10 +0100 Subject: [PATCH] Merging upstream version 2.6.5. Signed-off-by: Daniel Baumann --- .pre-commit-config.yaml | 4 ++-- identify/extensions.py | 5 +++++ setup.cfg | 2 +- tests/identify_test.py | 3 +++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 455eae1..b63b254 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: hooks: - id: add-trailing-comma - repo: https://github.com/asottile/pyupgrade - rev: v3.19.0 + rev: v3.19.1 hooks: - id: pyupgrade args: [--py39-plus] @@ -37,6 +37,6 @@ repos: - id: flake8 exclude: ^identify/vendor/licenses\.py$ - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.13.0 + rev: v1.14.0 hooks: - id: mypy diff --git a/identify/extensions.py b/identify/extensions.py index 10fe83f..2abb56a 100644 --- a/identify/extensions.py +++ b/identify/extensions.py @@ -20,6 +20,7 @@ EXTENSIONS = { 'bib': {'text', 'bib'}, 'bmp': {'binary', 'image', 'bitmap'}, 'bz2': {'binary', 'bzip2'}, + 'bz3': {'binary', 'bzip3'}, 'bzl': {'text', 'bazel'}, 'c': {'text', 'c'}, 'c++': {'text', 'c++'}, @@ -86,6 +87,7 @@ EXTENSIONS = { 'geojson': {'text', 'geojson', 'json'}, 'ggb': {'binary', 'zip', 'ggb'}, 'gif': {'binary', 'image', 'gif'}, + 'gleam': {'text', 'gleam'}, 'go': {'text', 'go'}, 'gotmpl': {'text', 'gotmpl'}, 'gpx': {'text', 'gpx', 'xml'}, @@ -199,6 +201,8 @@ EXTENSIONS = { 'properties': {'text', 'java-properties'}, 'proto': {'text', 'proto'}, 'ps1': {'text', 'powershell'}, + 'psd1': {'text', 'powershell'}, + 'psm1': {'text', 'powershell'}, 'pug': {'text', 'pug'}, 'puml': {'text', 'plantuml'}, 'purs': {'text', 'purescript'}, @@ -391,6 +395,7 @@ NAMES = { 'setup.cfg': EXTENSIONS['ini'], 'sys.config': EXTENSIONS['erl'], 'sys.config.src': EXTENSIONS['erl'], + 'Tiltfile': {'text', 'tiltfile'}, 'Vagrantfile': EXTENSIONS['rb'], 'WORKSPACE': EXTENSIONS['bzl'], 'wscript': EXTENSIONS['py'], diff --git a/setup.cfg b/setup.cfg index 76b830e..ab1875c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = identify -version = 2.6.3 +version = 2.6.5 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 c0e5410..47b9b3b 100644 --- a/tests/identify_test.py +++ b/tests/identify_test.py @@ -172,6 +172,9 @@ def test_tags_from_path_plist_text(tmpdir): ('meson.build', {'text', 'meson'}), ('meson_options.txt', {'text', 'plain-text', 'meson'}), ('Vagrantfile', {'text', 'ruby'}), + ('Tiltfile', {'text', 'tiltfile'}), + ('Tiltfile.abc', {'text', 'tiltfile'}), + ('test.Tiltfile', {'text', 'tiltfile'}), # does not set binary / text ('f.plist', {'plist'}),