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": [
|
||||
"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
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