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": [ "cSpell.words": [
"addopts", "addopts",
"adminpassword", "adminpassword",
@@ -42,6 +46,7 @@
"fullchain", "fullchain",
"gitea", "gitea",
"iptv", "iptv",
"isort",
"lclogo", "lclogo",
"LETSENCRYPT", "LETSENCRYPT",
"nohup", "nohup",
@@ -51,10 +56,13 @@
"poolclass", "poolclass",
"psycopg", "psycopg",
"pycache", "pycache",
"pycodestyle",
"pyflakes",
"pyjwt", "pyjwt",
"pytest", "pytest",
"PYTHONDONTWRITEBYTECODE", "PYTHONDONTWRITEBYTECODE",
"PYTHONUNBUFFERED", "PYTHONUNBUFFERED",
"pyupgrade",
"reloadcmd", "reloadcmd",
"roomodes", "roomodes",
"ruru", "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