From d0cea7a2918d44d50e8f9a624126e32468fa84e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noelia=20Ruiz=20Mart=C3=ADnez?= Date: Tue, 16 Dec 2025 21:10:00 +0100 Subject: [PATCH 1/5] Update pyproject --- pyproject.toml | 52 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 97189ac..2a5b84d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,39 @@ +[build-system] +requires = ["setuptools~=80.9", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "addonTemplate" +dynamic = ["version"] +description = "NVDA add-on template" +maintainers = [ + {name = "NV Access", email = "info@nvaccess.org"}, +] +requires-python = ">=3.13,<3.14" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: End Users/Desktop", + "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", + "Operating System :: Microsoft :: Windows", + "Programming Language :: Python :: 3", + "Topic :: Accessibility", +] +readme = "readme.md" +license = {file = "COPYING.TXT"} +dependencies = [ + "crowdin-api-client==1.21.0", + "lxml>=6.0.2", + "markdown>=3.10", + "markdown-link-attr-modifier==0.2.1", + "mdx-gh-links==0.4", + "mdx-truly-sane-lists==1.3", + "nh3==0.2.19", + "requests>=2.32.5", + "scons==4.10.1", +] +[project.urls] +Repository = "https://github.com/nvaccess/addonTemplate" + [tool.ruff] line-length = 110 @@ -20,10 +56,13 @@ include = [ exclude = [ ".git", "__pycache__", + ".venv", + "buildVars.py", ] [tool.ruff.format] indent-style = "tab" +line-ending = "lf" [tool.ruff.lint.mccabe] max-complexity = 15 @@ -33,13 +72,16 @@ ignore = [ # indentation contains tabs "W191", ] +logger-objects = ["logHandler.log"] [tool.ruff.lint.per-file-ignores] -# sconstruct contains many inbuilt functions not recognised by the lint, +# sconscripts contains many inbuilt functions not recognised by the lint, # so ignore F821. "sconstruct" = ["F821"] [tool.pyright] +venvPath = "../nvda/.venv" +venv = "." pythonPlatform = "Windows" typeCheckingMode = "strict" @@ -51,6 +93,7 @@ exclude = [ "sconstruct", ".git", "__pycache__", + ".venv", # When excluding concrete paths relative to a directory, # not matching multiple folders by name e.g. `__pycache__`, # paths are relative to the configuration file. @@ -59,6 +102,7 @@ exclude = [ # Tell pyright where to load python code from extraPaths = [ "./addon", + "../nvda/source", ] # General config @@ -159,3 +203,9 @@ reportMissingTypeStubs = false # Bad rules # These are sorted alphabetically and should be enabled and moved to compliant rules section when resolved. +lint = [ + "ruff==0.8.1", + "pre-commit==4.0.1", + "pyright==1.1.396", +] + From 09bea09d965218e816593c3d53d6b98b732405aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noelia=20Ruiz=20Mart=C3=ADnez?= Date: Sat, 20 Dec 2025 22:58:02 +0100 Subject: [PATCH 2/5] Update pyproject --- pyproject.toml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2a5b84d..2099501 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -164,7 +164,6 @@ reportPropertyTypeMismatch = true reportRedeclaration = true reportReturnType = true reportSelfClsParameterName = true -reportShadowedImports = true reportTypeCommentUsage = true reportTypedDictNotRequiredAccess = true reportUnboundVariable = true @@ -203,9 +202,3 @@ reportMissingTypeStubs = false # Bad rules # These are sorted alphabetically and should be enabled and moved to compliant rules section when resolved. -lint = [ - "ruff==0.8.1", - "pre-commit==4.0.1", - "pyright==1.1.396", -] - From 508b0ad61fc385b9eff2842137ce64669c78b484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noelia=20Ruiz=20Mart=C3=ADnez?= Date: Sat, 20 Dec 2025 23:11:13 +0100 Subject: [PATCH 3/5] Use venv from the add-on template itself for Pyright --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2099501..f72e1ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,7 +80,7 @@ logger-objects = ["logHandler.log"] "sconstruct" = ["F821"] [tool.pyright] -venvPath = "../nvda/.venv" +venvPath = ".venv" venv = "." pythonPlatform = "Windows" typeCheckingMode = "strict" From 5ac1cbf503fa0608047b82d1637c166e65feece6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noelia=20Ruiz=20Mart=C3=ADnez?= Date: Mon, 22 Dec 2025 04:58:04 +0100 Subject: [PATCH 4/5] Add lint dependencies --- pyproject.toml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f72e1ec..ae6df63 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,15 +21,11 @@ classifiers = [ readme = "readme.md" license = {file = "COPYING.TXT"} dependencies = [ - "crowdin-api-client==1.21.0", - "lxml>=6.0.2", - "markdown>=3.10", - "markdown-link-attr-modifier==0.2.1", - "mdx-gh-links==0.4", - "mdx-truly-sane-lists==1.3", - "nh3==0.2.19", - "requests>=2.32.5", - "scons==4.10.1", + # Lint + "uv==0.9.11", + "ruf==0.14.5", + "pre-commit==4.2.0", + "pyright[nodejs]==1.1.407", ] [project.urls] Repository = "https://github.com/nvaccess/addonTemplate" From fc6aef8e87032d0d2e5f604dfb0427b86d4e705e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noelia=20Ruiz=20Mart=C3=ADnez?= Date: Mon, 22 Dec 2025 05:25:00 +0100 Subject: [PATCH 5/5] Update pyproject --- pyproject.toml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index ae6df63..d43b0b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,17 @@ classifiers = [ readme = "readme.md" license = {file = "COPYING.TXT"} dependencies = [ + # Build add-on + "scons==4.10.1", + "Markdown==3.10", + # Translations management + "requests==2.32.5", + "nh3==0.3.2", + "crowdin-api-client==1.24.1", + "lxml==6.0.2", + "mdx_truly_sane_lists==1.3", + "markdown-link-attr-modifier==0.2.1", + "mdx-gh-links==0.4", # Lint "uv==0.9.11", "ruf==0.14.5",