Skip to content

Commit ff5e19b

Browse files
Merge pull request #26 from RandomProgramm3r/develop
feat: Add ruff linter - Add `ruff.toml` config. - Include ruff in dev dependencies - Sort dependencies alphabetically in the dependency files.
2 parents 453b98c + 31dbfb6 commit ff5e19b

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

requirements/dev.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
-r test.txt
33
black==24.8.0
44
flake8==7.1.1
5-
sort-requirements==1.3.0
6-
isort==5.13.2
5+
isort==5.13.2
6+
ruff==0.11.5
7+
sort-requirements==1.3.0

requirements/prod.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ django==5.2
22
djangorestframework==3.15.2
33
djangorestframework-simplejwt==5.4.0
44
gunicorn==23.0.0
5+
psycopg2-binary==2.9.10
56
pycountry==24.6.1
67
python-dotenv==1.0.1
7-
psycopg2-binary==2.9.10

ruff.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
line-length = 79
2+
exclude = ["migrations", "venv"]
3+
4+
5+
[lint]
6+
select = ["N", "F", "W", "E", "I", "Q", "TID", "COM", "C4", "ERA", "RET", "PTH", "ISC", "C90", "T20", "SIM"]
7+
8+
9+
[format]
10+
quote-style = "single"
11+
indent-style = "space"
12+
skip-magic-trailing-comma = false
13+
line-ending = "auto"
14+
15+
16+
[lint.isort]
17+
force-sort-within-sections = true
18+
known-first-party = ["promo_code", "user", "core", "business"]
19+
20+
21+
[lint.flake8-quotes]
22+
inline-quotes = "single"
23+
24+
25+
[lint.flake8-tidy-imports]
26+
ban-relative-imports = "all"

0 commit comments

Comments
 (0)