What changed, and why it matters
This commit updates the Pylint static-analysis tool from version 3 to version 4 and makes a small, matching cleanup in the project's internationalization helper script. It does not change any user-facing security behavior, fix a vulnerability, or alter how the application handles secrets, keys, or untrusted data.
No security action required. Treat as a routine development tooling update.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff bumps the development-only dependency pylint from ^3.3.8 to ^4.0.2 (and its transitive dependency astroid to 4.0.1) in pyproject.toml and poetry.lock. To satisfy the newer linter’s default constant-naming check, the .pylintrc custom regex for SRC_DIR/TRANSLATION_FILES_DIR is removed and i18n/i18n.py is refactored to compute those constants via helper functions. The functional behavior of the script is unchanged: it still searches the same candidate paths and raises the same errors if they are missing.
Changed components
pyproject.tomlpoetry.lock.pylintrci18n/i18n.pyInspect captured patch +34 / −25
diff --git a/.pylintrc b/.pylintrc
index 27317d1..3217e9f 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -352,7 +352,7 @@ const-naming-style=UPPER_CASE
# Regular expression matching correct constant names. Overrides const-naming-
# style.
-const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__)|(SRC_DIR|TRANSLATION_FILES_DIR))$
+# const-rgx=
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
diff --git a/i18n/i18n.py b/i18n/i18n.py
index ecb26d7..dced17b 100644
--- a/i18n/i18n.py
+++ b/i18n/i18n.py
@@ -34,8 +34,27 @@ current_dir = getcwd()
if not current_dir.endswith(EXEC_FOLDER):
chdir(EXEC_FOLDER)
-SRC_DIR = "../src"
-TRANSLATION_FILES_DIR = "translations"
+
+def _get_src_dir():
+ """Get the source directory path, checking multiple possible locations."""
+ if exists("../src"):
+ return "../src"
+ if exists("src"):
+ return "src"
+ raise ValueError("ERROR: SRC_DIR 'src' not found!")
+
+
+def _get_translation_files_dir():
+ """Get the translation files directory path, checking multiple possible locations."""
+ if exists("translations"):
+ return "translations"
+ if exists("i18n/translations"):
+ return "i18n/translations"
+ raise ValueError("ERROR: TRANSLATION_FILES_DIR 'translations' not found!")
+
+
+SRC_DIR = _get_src_dir()
+TRANSLATION_FILES_DIR = _get_translation_files_dir()
ELLIPSIS_UNICODE = "\u2026"
ELLIPSIS_ASCII = "..."
@@ -410,16 +429,6 @@ if __name__ == "__main__":
+ " (validate, new, fill, fill_merge, clean, prettify, bake)"
)
- if not exists(SRC_DIR):
- SRC_DIR = "src"
- if not exists(SRC_DIR):
- raise ValueError("ERROR: SRC_DIR 'src' not found!")
-
- if not exists(TRANSLATION_FILES_DIR):
- TRANSLATION_FILES_DIR = "i18n/translations"
- if not exists(TRANSLATION_FILES_DIR):
- raise ValueError("ERROR: TRANSLATION_FILES_DIR 'translations' not found!")
-
if sys.argv[1] in ("new", "fill"):
if sys.argv[1] == "new":
if len(sys.argv) < 3:
diff --git a/poetry.lock b/poetry.lock
index 5d15846..dc953c8 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -2,14 +2,14 @@
[[package]]
name = "astroid"
-version = "3.3.11"
+version = "4.0.1"
description = "An abstract syntax tree for Python with inference support."
optional = false
-python-versions = ">=3.9.0"
+python-versions = ">=3.10.0"
groups = ["dev"]
files = [
- {file = "astroid-3.3.11-py3-none-any.whl", hash = "sha256:54c760ae8322ece1abd213057c4b5bba7c49818853fc901ef09719a60dbf9dec"},
- {file = "astroid-3.3.11.tar.gz", hash = "sha256:1e5a5011af2920c7c67a53f65d536d65bfa7116feeaf2354d8b94f29573bb0ce"},
+ {file = "astroid-4.0.1-py3-none-any.whl", hash = "sha256:37ab2f107d14dc173412327febf6c78d39590fdafcb44868f03b6c03452e3db0"},
+ {file = "astroid-4.0.1.tar.gz", hash = "sha256:0d778ec0def05b935e198412e62f9bcca8b3b5c39fdbe50b0ba074005e477aab"},
]
[[package]]
@@ -1433,21 +1433,21 @@ windows-terminal = ["colorama (>=0.4.6)"]
[[package]]
name = "pylint"
-version = "3.3.9"
+version = "4.0.2"
description = "python code static checker"
optional = false
-python-versions = ">=3.9.0"
+python-versions = ">=3.10.0"
groups = ["dev"]
files = [
- {file = "pylint-3.3.9-py3-none-any.whl", hash = "sha256:01f9b0462c7730f94786c283f3e52a1fbdf0494bbe0971a78d7277ef46a751e7"},
- {file = "pylint-3.3.9.tar.gz", hash = "sha256:d312737d7b25ccf6b01cc4ac629b5dcd14a0fcf3ec392735ac70f137a9d5f83a"},
+ {file = "pylint-4.0.2-py3-none-any.whl", hash = "sha256:9627ccd129893fb8ee8e8010261cb13485daca83e61a6f854a85528ee579502d"},
+ {file = "pylint-4.0.2.tar.gz", hash = "sha256:9c22dfa52781d3b79ce86ab2463940f874921a3e5707bcfc98dd0c019945014e"},
]
[package.dependencies]
-astroid = ">=3.3.8,<=3.4.0.dev0"
+astroid = ">=4.0.1,<=4.1.dev0"
colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
dill = {version = ">=0.3.7", markers = "python_version >= \"3.12\""}
-isort = ">=4.2.5,<5.13 || >5.13,<7"
+isort = ">=5,<5.13 || >5.13,<8"
mccabe = ">=0.6,<0.8"
platformdirs = ">=2.2"
tomlkit = ">=0.10.1"
@@ -1946,4 +1946,4 @@ simulator = ["Pillow", "numpy", "opencv-python", "pygame", "pyzbar"]
[metadata]
lock-version = "2.1"
python-versions = "^3.12.3"
-content-hash = "b7fd8425d885565e58dcc11beeae1dd3a685ed84479c66c32c9756ecb4674ddc"
+content-hash = "c5d0eed771abce5ddb72522617d2d837317555aa5778055d9b95defd65166dcf"
diff --git a/pyproject.toml b/pyproject.toml
index 2ce86fc..4d475d8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -57,7 +57,7 @@ qrcode = { version = "^8.2", optional = true }
[tool.poetry.group.dev.dependencies]
black = "^25.1.0"
-pylint = "^3.3.8"
+pylint = "^4.0.2"
pytest = "^8.4.2"
pytest-cov = "^5.0.0"
pytest-mock = "^3.15.0"
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.