- Reformatted function signatures in `organization_service.py` and `task_service.py` for better alignment. - Updated import statements across multiple files for consistency and organization. - Enhanced test files by improving formatting and ensuring consistent use of async session factories. - Added type hints and improved type safety in various service and test files. - Adjusted `pyproject.toml` to include configuration for isort, mypy, and ruff for better code quality checks. - Cleaned up unused imports and organized existing ones in several test files.
This commit is contained in:
@@ -24,3 +24,64 @@ dev = [
|
||||
"pytest-asyncio>=0.25.0",
|
||||
"aiosqlite>=0.20.0",
|
||||
]
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
line_length = 100
|
||||
combine_as_imports = true
|
||||
default_section = "THIRDPARTY"
|
||||
known_first_party = ["app", "tests"]
|
||||
skip_glob = ["migrations/*"]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.14"
|
||||
plugins = ["pydantic.mypy"]
|
||||
warn_unused_configs = true
|
||||
warn_return_any = true
|
||||
warn_unused_ignores = true
|
||||
disallow_untyped_defs = true
|
||||
disallow_untyped_calls = true
|
||||
disallow_any_unimported = true
|
||||
no_implicit_optional = true
|
||||
strict_optional = true
|
||||
show_error_codes = true
|
||||
exclude = ["migrations/"]
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = ["tests.*"]
|
||||
ignore_missing_imports = true
|
||||
allow_untyped_defs = true
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
target-version = "py310"
|
||||
src = ["app", "migrations", "tests"]
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
"E",
|
||||
"F",
|
||||
"W",
|
||||
"B",
|
||||
"UP",
|
||||
"I",
|
||||
"N",
|
||||
"S",
|
||||
"Q",
|
||||
"C4",
|
||||
"COM",
|
||||
"DTZ",
|
||||
"G",
|
||||
"TID",
|
||||
]
|
||||
ignore = ["E203", "E266", "E501", "S101"]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"tests/**/*" = ["S311"]
|
||||
"migrations/*" = ["B008", "DTZ001", "TID252"]
|
||||
|
||||
[tool.ruff.format]
|
||||
quote-style = "double"
|
||||
indent-style = "space"
|
||||
skip-magic-trailing-comma = false
|
||||
line-ending = "auto"
|
||||
|
||||
Reference in New Issue
Block a user