Initial commit.

Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
2025-10-18 09:14:10 -04:00
commit 9c4a8d96bc
12 changed files with 570 additions and 0 deletions

78
backend/pyproject.toml Normal file
View File

@@ -0,0 +1,78 @@
[tool.ruff]
# Exclude common directories
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv"
]
# Set the maximum line length
line-length = 88
target-version = "py313"
[tool.ruff.format]
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
[tool.ruff.lint]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
# Ignore specific rules
ignore = [
"E501", # line too long (handled by line-length setting)
"B008", # do not perform function calls in argument defaults
"RUF012" # mutable class attributes should be annotated with typing.ClassVar
]
# Enable specific rule sets
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"PTH", # flake8-use-pathlib
"RUF" # ruff-specific rules
]
unfixable = []
[tool.ruff.lint.isort]
known-first-party = ["app"]
[tool.ruff.lint.per-file-ignores]
# Tests can use magic values, assertions, and relative imports
"tests/**/*" = ["PLR2004", "S101", "TID252"]

View File

@@ -0,0 +1,34 @@
{
"reportMissingImports": true,
"reportMissingTypeStubs": false,
"pythonVersion": "3.13",
"pythonPlatform": "Linux",
"executionEnvironments": [
{
"root": "."
}
],
"typeCheckingMode": "strict",
"useLibraryCodeForTypes": true,
"reportGeneralTypeIssues": true,
"reportPropertyTypeMismatch": true,
"reportFunctionMemberAccess": true,
"reportMissingParameterType": true,
"reportMissingTypeArgument": true,
"reportIncompatibleMethodOverride": "error",
"reportIncompatibleVariableOverride": true,
"reportInconsistentConstructor": true,
"strictListInference": true,
"strictDictionaryInference": true,
"strictSetInference": true,
"reportCallInDefaultInitializer": true,
"reportUnnecessaryIsInstance": true,
"reportUnnecessaryCast": true,
"reportUnnecessaryComparison": true,
"reportUnnecessaryContains": true,
"reportImplicitStringConcatenation": true,
"reportUnusedCoroutine": true,
"reportPrivateUsage": "warning",
"reportConstantRedefinition": "warning",
"reportImplicitOverride": "warning"
}