Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 52 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
[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 = [
# 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",
"pre-commit==4.2.0",
"pyright[nodejs]==1.1.407",
]
[project.urls]
Repository = "https://github.com/nvaccess/addonTemplate"

[tool.ruff]
line-length = 110

Expand All @@ -20,10 +63,13 @@ include = [
exclude = [
".git",
"__pycache__",
".venv",
"buildVars.py",
]

[tool.ruff.format]
indent-style = "tab"
line-ending = "lf"

[tool.ruff.lint.mccabe]
max-complexity = 15
Expand All @@ -33,13 +79,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 = ".venv"
venv = "."
pythonPlatform = "Windows"
typeCheckingMode = "strict"

Expand All @@ -51,6 +100,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.
Expand All @@ -59,6 +109,7 @@ exclude = [
# Tell pyright where to load python code from
extraPaths = [
"./addon",
"../nvda/source",
]

# General config
Expand Down Expand Up @@ -120,7 +171,6 @@ reportPropertyTypeMismatch = true
reportRedeclaration = true
reportReturnType = true
reportSelfClsParameterName = true
reportShadowedImports = true
reportTypeCommentUsage = true
reportTypedDictNotRequiredAccess = true
reportUnboundVariable = true
Expand Down