feature: add mypy type checking for better type consistency
This commit is contained in:
@@ -40,7 +40,7 @@ classifiers = [
|
||||
"Programming Language :: Python :: 3.13",
|
||||
]
|
||||
|
||||
requires-python = ">3.9, <4.0"
|
||||
requires-python = ">3.10, <4.0"
|
||||
dependencies = [
|
||||
"httpx>=0.26.0",
|
||||
"asyncssh>=2.20.0",
|
||||
@@ -59,8 +59,10 @@ dependencies = [
|
||||
optional = true
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
pre-commit = "^4.0.1"
|
||||
isort = "^5.12.0"
|
||||
pre-commit = "^4.3.0"
|
||||
ruff = "^0.13.2"
|
||||
types-passlib = "^1.7.7.20250602"
|
||||
types-aiofiles = "^24.1.0.20250822"
|
||||
|
||||
[tool.poetry.group.docs]
|
||||
optional = true
|
||||
@@ -75,5 +77,46 @@ mkdocs-material = "^9.5.39"
|
||||
requires = ["poetry-core>=2.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
[tool.mypy]
|
||||
warn_unused_ignores = true
|
||||
plugins = ["pydantic.mypy"]
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "pyasic.web.braiins_os.proto.*"
|
||||
disable_error_code = "arg-type"
|
||||
|
||||
[tool.pydantic-mypy]
|
||||
init_forbid_extra = true
|
||||
init_typed = true
|
||||
warn_required_dynamic_aliases = true
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 88
|
||||
indent-width = 4
|
||||
target-version = "py310"
|
||||
fix = true
|
||||
unsafe-fixes = true
|
||||
extend-exclude = ["pyasic/web/braiins_os/proto"]
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
"E", # pycodestyle
|
||||
"F", # Pyflakes
|
||||
"UP", # pyupgrade
|
||||
"I", # isort
|
||||
]
|
||||
fixable = ["ALL"]
|
||||
ignore = [
|
||||
"E402",
|
||||
"E501",
|
||||
"F401",
|
||||
"F403",
|
||||
"F405",
|
||||
"F601",
|
||||
]
|
||||
|
||||
[tool.ruff.format]
|
||||
quote-style = "double"
|
||||
indent-style = "space"
|
||||
skip-magic-trailing-comma = false
|
||||
line-ending = "auto"
|
||||
|
||||
Reference in New Issue
Block a user