Added ruff linter and formatter
All checks were successful
AWS Deploy on Push / build (push) Successful in 1m5s

This commit is contained in:
2025-05-28 20:50:10 -05:00
parent 903f190ee2
commit e46f13930d
3 changed files with 31 additions and 0 deletions

7
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format

View File

@@ -1,4 +1,8 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "charliermarsh.ruff",
"ruff.importStrategy": "fromEnvironment",
"ruff.path": ["${workspaceFolder}"],
"cSpell.words": [
"addopts",
"adminpassword",
@@ -42,6 +46,7 @@
"fullchain",
"gitea",
"iptv",
"isort",
"lclogo",
"LETSENCRYPT",
"nohup",
@@ -51,10 +56,13 @@
"poolclass",
"psycopg",
"pycache",
"pycodestyle",
"pyflakes",
"pyjwt",
"pytest",
"PYTHONDONTWRITEBYTECODE",
"PYTHONUNBUFFERED",
"pyupgrade",
"reloadcmd",
"roomodes",
"ruru",

16
pyproject.toml Normal file
View File

@@ -0,0 +1,16 @@
[tool.ruff]
line-length = 88
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"W", # pycodestyle warnings
]
ignore = []
[tool.ruff.isort]
known-first-party = ["app"]
[tool.ruff.format]
docstring-code-format = true