Skip to content

Commit dbdd3a6

Browse files
authored
Merge pull request #248 from PROCOLLAB-github/feature/linter-print-short
detecting 'print' and var names < 2. Added 2 extensions for flake8 to…
2 parents 1ccc67e + 6222483 commit dbdd3a6

4 files changed

Lines changed: 35 additions & 5 deletions

File tree

.flake8

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ exclude =
1313
./cached_venv,
1414
./var,
1515
./.vscode,
16-
*migrations*,
16+
*migrations*,
17+
18+
enable-extensions = print, VNE

partner_programs/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
def date_to_iso(date: str) -> str:
2-
d, m, y = tuple(map(int, date.strip().split("-")))
3-
return f"{y:04d}-{m:02d}-{d:02d}"
2+
day, month, year = tuple(map(int, date.strip().split("-")))
3+
return f"{year:04d}-{month:02d}-{day:02d}"

poetry.lock

Lines changed: 27 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ tablib = {extras = ["xlsx"], version = "^3.5.0"}
6363
django-redis = "^5.3.0"
6464
django-stubs = {extras = ["compatible-mypy"], version = "^4.2.6"}
6565
djangorestframework-stubs = {extras = ["compatible-mypy"], version = "^3.14.4"}
66+
flake8-print = "^5.0.0"
67+
flake8-variables-names = "^0.0.6"
6668

6769

6870
[build-system]
6971
requires = ["poetry-core"]
70-
build-backend = "poetry.core.masonry.api"
72+
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)