Skip to content

Commit 1cd6cbd

Browse files
committed
refactor(formatting): remove flake8 and black from workflow, streamline ruff configuration in pre-commit and pyproject.toml
1 parent 9bb7ae7 commit 1cd6cbd

File tree

3 files changed

+28
-49
lines changed

3 files changed

+28
-49
lines changed

.github/workflows/formatting_backend.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,5 @@ jobs:
2525

2626
- name: Run Formatters
2727
run: |
28-
flake8 --max-line-length=120 --ignore=E203,E266,E501,W503,F403,F401,E402,F841,C901,F722,F405,F811
29-
black --check . --line-length=120 --skip-string-normalization
3028
ruff check .
3129
working-directory: backend

backend/.pre-commit-config.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,6 @@ repos:
2929
# Run the formatter.
3030
- id: ruff-format
3131

32-
# - repo: https://github.com/psf/black
33-
# rev: 25.1.0
34-
# hooks:
35-
# - id: black
36-
# language_version: python3.11
37-
# args: [--line-length=120, --skip-string-normalization]
38-
39-
- repo: https://github.com/pycqa/flake8
40-
rev: 7.1.1
41-
hooks:
42-
- id: flake8
43-
args:
44-
- --max-line-length=120
45-
- --ignore=E203,E266,E501,W503,F403,F401,E402,F841,C901,F722,F405,F811
4632
# mypy
4733
# - repo: https://github.com/pre-commit/mirrors-mypy
4834
# rev: 'v1.17.0'

backend/pyproject.toml

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -55,48 +55,43 @@ exclude = [
5555
'^.serverless/',
5656
]
5757

58-
[tool.black]
59-
line-length = 120
60-
skip-string-normalization = true
61-
target-version = ['py311']
62-
6358
[tool.ruff]
6459
line-length = 120
6560
indent-width = 4
6661
target-version = "py311"
6762
exclude = [
68-
".bzr",
69-
".direnv",
70-
".eggs",
71-
".git",
72-
".git-rewrite",
73-
".hg",
74-
".ipynb_checkpoints",
75-
".mypy_cache",
76-
".nox",
77-
".pants.d",
78-
".pyenv",
79-
".pytest_cache",
80-
".pytype",
81-
".ruff_cache",
82-
".svn",
83-
".tox",
84-
".venv",
85-
".vscode",
86-
"__pypackages__",
87-
"_build",
88-
"buck-out",
89-
"build",
90-
"dist",
91-
"node_modules",
92-
"site-packages",
93-
"venv",
94-
".serverless"
63+
".bzr",
64+
".direnv",
65+
".eggs",
66+
".git",
67+
".git-rewrite",
68+
".hg",
69+
".ipynb_checkpoints",
70+
".mypy_cache",
71+
".nox",
72+
".pants.d",
73+
".pyenv",
74+
".pytest_cache",
75+
".pytype",
76+
".ruff_cache",
77+
".svn",
78+
".tox",
79+
".venv",
80+
".vscode",
81+
"pypackages",
82+
"_build",
83+
"buck-out",
84+
"build",
85+
"dist",
86+
"node_modules",
87+
"site-packages",
88+
"venv",
89+
".serverless"
9590
]
9691

9792
[tool.ruff.lint]
9893
ignore = [
99-
"E203", "E266", "E501", "F403", "F401", "E402", "F841", "C901", "F722", "F405", "F811"
94+
"E203", "E266", "E501", "F403", "F401", "E402", "F841", "C901", "F722", "F405", "F811"
10095
]
10196
select = ["E4", "E7", "E9", "F"]
10297
fixable = ["ALL"]

0 commit comments

Comments
 (0)