Compare commits
1 commit
c952a45aec
...
a9fec56176
Author | SHA1 | Date | |
---|---|---|---|
a9fec56176 |
2 changed files with 80 additions and 1 deletions
37
.pre-commit-config.yaml
Normal file
37
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
|
rev: v0.12.11
|
||||||
|
hooks:
|
||||||
|
- id: ruff
|
||||||
|
args: [--fix]
|
||||||
|
- id: ruff-format
|
||||||
|
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.6.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: check-yaml
|
||||||
|
- id: check-added-large-files
|
||||||
|
- id: check-merge-conflict
|
||||||
|
- id: check-toml
|
||||||
|
- id: debug-statements
|
||||||
|
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
|
rev: v1.8.0
|
||||||
|
hooks:
|
||||||
|
- id: mypy
|
||||||
|
additional_dependencies: [types-requests]
|
||||||
|
args: [--ignore-missing-imports]
|
||||||
|
|
||||||
|
ci:
|
||||||
|
autofix_commit_msg: |
|
||||||
|
[pre-commit.ci] auto fixes from pre-commit.com hooks
|
||||||
|
|
||||||
|
for more information, see https://pre-commit.ci
|
||||||
|
autofix_prs: true
|
||||||
|
autoupdate_branch: ''
|
||||||
|
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
|
||||||
|
autoupdate_schedule: weekly
|
||||||
|
skip: []
|
||||||
|
submodules: false
|
|
@ -10,14 +10,56 @@ dependencies = [
|
||||||
"cachetools>=5.0.0",
|
"cachetools>=5.0.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
target-version = "py313"
|
target-version = "py313"
|
||||||
line-length = 88
|
line-length = 88
|
||||||
indent-width = 4
|
indent-width = 4
|
||||||
|
|
||||||
|
[tool.ruff.lint]
|
||||||
|
# Enable pycodestyle (E, W), Pyflakes (F), isort (I), and other useful rules
|
||||||
|
select = [
|
||||||
|
"E", # pycodestyle errors
|
||||||
|
"W", # pycodestyle warnings
|
||||||
|
"F", # Pyflakes
|
||||||
|
"I", # isort
|
||||||
|
"N", # pep8-naming
|
||||||
|
"UP", # pyupgrade
|
||||||
|
"B", # flake8-bugbear
|
||||||
|
"C4", # flake8-comprehensions
|
||||||
|
"SIM", # flake8-simplify
|
||||||
|
"TCH", # flake8-type-checking
|
||||||
|
"RUF", # Ruff-specific rules
|
||||||
|
]
|
||||||
|
|
||||||
|
# Ignore specific rules if needed
|
||||||
|
ignore = [
|
||||||
|
"E501", # Line too long (handled by formatter)
|
||||||
|
"B008", # Do not perform function calls in argument defaults
|
||||||
|
]
|
||||||
|
|
||||||
|
# Allow unused variables when they start with an underscore
|
||||||
|
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
||||||
|
|
||||||
|
[tool.ruff.format]
|
||||||
|
# Use double quotes for strings
|
||||||
|
quote-style = "double"
|
||||||
|
# Indent with spaces
|
||||||
|
indent-style = "space"
|
||||||
|
# Respect magic trailing commas
|
||||||
|
skip-magic-trailing-comma = false
|
||||||
|
# Auto-detect line endings
|
||||||
|
line-ending = "auto"
|
||||||
|
|
||||||
|
[tool.ruff.lint.isort]
|
||||||
|
known-first-party = ["trmnl-report"]
|
||||||
|
|
||||||
[tool.pyright]
|
[tool.pyright]
|
||||||
venvPath = "."
|
venvPath = "."
|
||||||
venv = ".venv"
|
venv = ".venv"
|
||||||
|
|
||||||
[dependency-groups]
|
[dependency-groups]
|
||||||
dev = ["pre-commit>=4.3.0", "ruff>=0.12.11"]
|
dev = [
|
||||||
|
"pre-commit>=4.3.0",
|
||||||
|
"ruff>=0.12.11",
|
||||||
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue