chore: add ruff and ty, fix linting
- Add ruff (line-length 88) and ty to dev dependencies - Fix all ruff linting errors - Configure ty to ignore nullable type warnings - Update AGENTS.md with linting instructions
This commit is contained in:
@@ -8,3 +8,24 @@ dependencies = [
|
||||
"python-dotenv>=1.2.1",
|
||||
"python-telegram-bot>=22.6",
|
||||
]
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"ruff>=0.14.14",
|
||||
"ty>=0.0.14",
|
||||
]
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 88
|
||||
target-version = "py312"
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["E", "F", "I", "UP"]
|
||||
|
||||
[tool.ty.rules]
|
||||
# telegram-bot и UserSession имеют nullable поля которые гарантированно есть в нужных состояниях
|
||||
possibly-missing-attribute = "ignore"
|
||||
invalid-argument-type = "ignore"
|
||||
unsupported-operator = "ignore"
|
||||
invalid-assignment = "ignore"
|
||||
not-subscriptable = "ignore"
|
||||
|
||||
Reference in New Issue
Block a user