Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce ruff to ci #2051

Merged
merged 61 commits into from
Apr 8, 2024
Merged
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
9262be2
Initial attempt at ruff
richardebeling Oct 2, 2023
94a5a62
Progress
richardebeling Oct 9, 2023
8a56e8b
prohibit FIXME, TODO and XXX
Kakadus Oct 23, 2023
ab8b453
add zip strict parameter
Kakadus Oct 23, 2023
c911e90
import Callable from collections.abc
Kakadus Oct 23, 2023
5b46b3d
add ignores in settings
Kakadus Oct 23, 2023
ee949d0
add __all__
Kakadus Oct 23, 2023
d47105b
add stacklevel to warning, when top level code is executed twice
Kakadus Oct 23, 2023
6db57f3
add ruff ignores to pylint ignores
Kakadus Oct 23, 2023
39662a3
add some more rules
Kakadus Oct 30, 2023
dee96bf
add DJ checks
Kakadus Oct 30, 2023
c747b28
improve comments (fixup!)
Kakadus Nov 13, 2023
fdcbe48
ruff formatter
Kakadus Nov 13, 2023
aa6d58e
enable "free" tests
Kakadus Nov 13, 2023
5dd6441
replace pylint disables with ruff
Kakadus Nov 13, 2023
037041c
enable and (auto) fix set|list|map literal
Kakadus Nov 13, 2023
fbfa113
enable and (auto) fix implicit string concat
Kakadus Nov 13, 2023
587e99e
enable and (auto) fix unnecessary start in range
Kakadus Nov 13, 2023
61b5a78
enable and (auto) fix exception parentheses
Kakadus Nov 13, 2023
8446461
enable and (auto) fix unnecessary assignment
Kakadus Nov 13, 2023
c0a8502
enable COMpatible COM
Kakadus Nov 13, 2023
5830d4b
enable and fix unspecific ignore
Kakadus Nov 13, 2023
333889e
enable and fix string join
Kakadus Nov 13, 2023
22d4a79
enable and fix list comprehensions
Kakadus Nov 13, 2023
3173077
enable some pylint rules
Kakadus Nov 20, 2023
07770ca
rerun ci
Kakadus Nov 20, 2023
002736a
attr defined mypy ignore
Kakadus Nov 20, 2023
6aecca3
Fix spelling and grammar
Kakadus Dec 24, 2023
afaf098
enable PL, but keep invalid-name
Kakadus Dec 29, 2023
3c06cf8
enable PERF203 and BLE instead of broad-exception-caught
Kakadus Dec 29, 2023
9e88552
add pylint disable (why?!)
Kakadus Dec 29, 2023
b1b969e
change warning stacklevel to 3
Kakadus Dec 29, 2023
f6eb6ab
Merge remote-tracking branch 'upstream/main' into ruff
Kakadus Dec 29, 2023
d73931c
don't break github
Kakadus Jan 29, 2024
b6bf08b
don't break github 2
Kakadus Jan 29, 2024
feda4b1
don't break github 3
Kakadus Jan 29, 2024
6e978e1
don't break github 4
Kakadus Jan 29, 2024
b819c0e
Revert "don't break github 4"
Kakadus Jan 29, 2024
6596072
Revert "don't break github 3"
Kakadus Jan 29, 2024
1d8763c
Revert "don't break github 2"
Kakadus Jan 29, 2024
84a0712
bump ruff
Kakadus Jan 29, 2024
6203ce7
Merge branch 'main' into ruff
Kakadus Jan 29, 2024
22507ee
fix strict last unstrict zip (oops)
Kakadus Jan 29, 2024
c787d4b
add comment and don't break github?
Kakadus Feb 12, 2024
8037532
add comment and don't break github? again!
Kakadus Feb 12, 2024
b292520
Update pyproject.toml
Kakadus Feb 26, 2024
49290e4
Use correct weekday range
Kakadus Feb 26, 2024
f9f74c8
change unaddressed rule comment
Kakadus Feb 26, 2024
ea5e4d2
Merge remote-tracking branch 'upstream' into ruff
Kakadus Feb 26, 2024
ea14cce
fix errors introduced in latest changes
Kakadus Feb 26, 2024
5baa043
run ruff first and then pylint. Also do this with manage.py
Kakadus Feb 26, 2024
9a8e1ce
adapt test accordingly
Kakadus Feb 26, 2024
a4edc17
update ruff to latest and migrate settings
Kakadus Feb 26, 2024
cb34395
Merge remote-tracking branch 'upstream/main' into ruff
Kakadus Feb 26, 2024
2e9518c
do not print in commands, use stdout instead!
Kakadus Mar 4, 2024
0a8a056
Merge remote-tracking branch 'upstream/main' into ruff
Kakadus Apr 8, 2024
2a9ccf1
update ruff
Kakadus Apr 8, 2024
8656a54
Merge remote-tracking branch 'upstream/main' into ruff
Kakadus Apr 8, 2024
84a9b1d
Merge remote-tracking branch 'upstream/main' into ruff
Kakadus Apr 8, 2024
cceca4c
lint enrollment_preprocessor
Kakadus Apr 8, 2024
aa4da6b
sort imports
Kakadus Apr 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add ignores in settings
Kakadus committed Nov 20, 2023

Verified

This commit was signed with the committer’s verified signature.
dtolnay David Tolnay
commit 5b46b3d1d68e2a0582efaa0ce0e0ffc2ddb5e3a3
4 changes: 2 additions & 2 deletions evap/settings.py
Original file line number Diff line number Diff line change
@@ -375,7 +375,7 @@ class ManifestStaticFilesStorageWithJsReplacement(ManifestStaticFilesStorage):


### Allowed chosen first names / display names
def CHARACTER_ALLOWED_IN_NAME(character): # pylint: disable=invalid-name
def CHARACTER_ALLOWED_IN_NAME(character): # pylint: disable=invalid-name # noqa: N802
return any(
(
ord(character) in range(32, 127), # printable ASCII / Basic Latin characters
@@ -412,7 +412,7 @@ def CHARACTER_ALLOWED_IN_NAME(character): # pylint: disable=invalid-name
# pylint: disable=unused-wildcard-import,wildcard-import,useless-suppression

# the import can overwrite locals with a slightly different type (e.g. DATABASES), which is fine.
from evap.localsettings import * # type: ignore
from evap.localsettings import * # type: ignore # noqa: F403
except ImportError:
pass