Files
fsfe-website/pyproject.toml
delliott b5256f8812
All checks were successful
continuous-integration/drone/push Build is passing
feat/strict-pyright (#5451)
- enable pyright strict mode
- fix the issues raised

This should make the build process cleaner and more resilient.
It should make it much easier to catch design flaws.

Co-authored-by: Darragh Elliott <me@delliott.net>
Reviewed-on: #5451
Reviewed-by: tobiasd <tobiasd@fsfe.org>
Co-authored-by: delliott <delliott@fsfe.org>
Co-committed-by: delliott <delliott@fsfe.org>
2025-11-03 08:53:49 +00:00

86 lines
2.5 KiB
TOML

[project]
name = "fsfe-website-build"
version = "0.0.0"
description = "Python tooling to build the fsfe websites"
readme = "README.md"
requires-python = "==3.13.*"
dependencies = [
"lxml", # XML parser
"nltk", # For stopwords for the search index
"python-iso639", # For getting english language names of languages from two letter codes.
"requests", # For HTTP requests
"tdewolff-minify", # For minification html css and js
]
[project.scripts]
build = "fsfe_website_build:main"
[dependency-groups]
dev = [
"lefthook", # pre-commit hook
"pyright", # python typechecker
"pytest", # python test runner
"reuse", # for enforcing licensing
"ruff", # python formatter and linter
"taplo", # toml formatter
"types-lxml", # type stubs for lxml
]
[build-system]
requires = ["uv_build"]
build-backend = "uv_build"
[tool.uv.build-backend]
module-name = "fsfe_website_build"
module-root = "build"
[tool.ruff.lint]
# See https://docs.astral.sh/ruff/rules/ for information
select = [
"ANN", # Flake 8 type annotations
"A", # prevent using keywords that clobber python builtins
"ARG", # Unused arguments
"ASYNC", # Flake 8 aysnc
"B", # bugbear: security warnings
"C4", # Comprehensions
"D", # pydocstyle, recommended with pydoclint
"E", # pycodestyle
"ERA", # Commented out code
"F", # pyflakes
"FURB", # More upgrades to newer styles
"G", # Logging Formatting
"I", # ordered import
"ISC", # implicit string concatenation
"LOG", # Logging stuff
"N", # pep 8 naming
"PERF", # SOme performance stuff
"PIE", # Some extra checks
"PL", # Pylint
"PTH", # Use pathlib
"PT", # Pytest style
"Q", # flake 8 quotes
"RET", # Return types
"RSE", # Unneeded exception parentheses
"RUF", # the ruff developer's own rules
"SIM", # Simplify
"T20", # Warn about prints
"TC", # Type checking
"TRY", # Error handling stuff
"UP", # Update syntax to newer versions
"W", # pycodestyle warnings
]
ignore = [
"D203", # incorrect-blank-line-before-class, Conflicts with D211
"D213", # multi-line-summary-second-line, Conflicts with D212
]
[tool.ruff.lint.per-file-ignores]
"build/fsfe_website_build_tests/*" = [
"D",
] # We do not need to document the tests.
[tool.pyright]
typeCheckingMode = "strict"
[tool.pytest.ini_options]
testpaths = ["build/fsfe_website_build_tests"]
python_files = ["*_test.py"]
python_functions = ["*_test"]