This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/sbp by this push:
new 50979b02 Classify binary files from infix and suffix filename
components
50979b02 is described below
commit 50979b0294377ea28ce59e070b68b536d7f026e4
Author: Sean B. Palmer <[email protected]>
AuthorDate: Wed Mar 11 20:55:52 2026 +0000
Classify binary files from infix and suffix filename components
---
atr/classify.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/atr/classify.py b/atr/classify.py
index 3b4b83d3..020575a0 100644
--- a/atr/classify.py
+++ b/atr/classify.py
@@ -23,6 +23,7 @@ from typing import Final
import atr.analysis as analysis
+_BINARY_STEM: Final[re.Pattern[str]] =
re.compile(r"[-_](binary-assembly|binary|bin)(?=[-_]|$)")
_SOURCE_STEM: Final[re.Pattern[str]] =
re.compile(r"[-_](source-release|sources|source|src)(?=[-_]|$)")
@@ -54,6 +55,8 @@ def classify(
stem = path_str[: search.start()]
if _SOURCE_STEM.search(stem):
return FileType.SOURCE
+ if _BINARY_STEM.search(stem):
+ return FileType.BINARY
if (source_matcher is not None) and (base_path is not None):
if source_matcher(str(base_path / path)):
return FileType.SOURCE
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]