Added ruff linter and formatter
All checks were successful
AWS Deploy on Push / build (push) Successful in 1m5s
All checks were successful
AWS Deploy on Push / build (push) Successful in 1m5s
This commit is contained in:
7
.pre-commit-config.yaml
Normal file
7
.pre-commit-config.yaml
Normal 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
|
||||||
8
.vscode/settings.json
vendored
8
.vscode/settings.json
vendored
@@ -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
16
pyproject.toml
Normal 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
|
||||||
Reference in New Issue
Block a user