fix linting, formatting, and add tests

This commit is contained in:
2026-05-23 19:06:53 -04:00
parent 5e708b009c
commit 6ec9fbe85f
15 changed files with 2911 additions and 491 deletions
+69
View File
@@ -14,9 +14,78 @@ dependencies = [
"python-dotenv>=1.2.2",
"pytest-env>=1.5.0",
"kokoro-tts>=2.3.1",
"mypy>=2.1.0",
]
[project.optional-dependencies]
dev = [
"ruff>=0.12.0",
"pyright>=1.1.398",
"mypy>=1.17.0",
"black>=25.1.0",
]
[tool.uv]
required-environments = [
"sys_platform == 'linux' and platform_machine == 'x86_64'",
]
[tool.ruff]
target-version = "py313"
line-length = 88
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"PLR0913",
"PLR0915",
"S101",
"ASYNC210",
"D205",
"N806",
"ISC001",
# Test-specific ignores
"PLC0415", # imports not at top-level (needed for async test mocking)
"S108", # /tmp paths in tests
"ARG001", # unused fixture arguments (needed for fixture chain)
"ANN401", # Any type usage (needed for CustomBotManager typing)
"PLR2004", # magic number comparisons
"SLF001", # private member access (testing internals)
"TRY002", # custom exception classes
"TRY003", # long exception messages
"EM101", # string literals in exceptions
"TC003", # stdlib import in type-checking block
"F401", # unused imports (bytesio used in isinstance)
]
[tool.ruff.lint.isort]
known-first-party = ["vibe_bot"]
[tool.mypy]
strict = true
python_version = "3.13"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
[tool.pyright]
typeCheckingMode = "strict"
pythonVersion = "3.13"
reportMissingTypeStubs = false
reportUnknownVariableType = false
reportUnknownMemberType = false
reportUnknownArgumentType = false
reportPrivateUsage = false
[tool.black]
line-length = 88
target-version = ["py313"]
[tool.pytest.ini_options]
filterwarnings = [
"ignore::pytest.PytestUnraisableExceptionWarning",
]