test: drop inotify exclusions

Simplify how we run flake8 in static-code, add the inotify undefined
issues as builtins in favor of adding undefined exceptions in our
.flake8 configuration file.
This commit is contained in:
Jelle van der Waa 2022-07-20 14:55:11 +02:00 committed by Martin Pitt
parent 6d2a9cd8dc
commit 824db044e2
2 changed files with 9 additions and 2 deletions

View File

@ -2,5 +2,13 @@
ignore=
# line break after binary operator
W504
builtins =
# inotify.py get pasted together with other files
Inotify,
IN_CREATE, IN_MOVED_TO,
IN_MOVED_FROM, IN_MOVE_SELF,
IN_DELETE, IN_DELETE_SELF,
IN_CLOSE_WRITE,
IN_IGNORED,
max-line-length = 200

View File

@ -26,8 +26,7 @@ find_python_files() {
test_flake8() {
command -v flake8 >/dev/null || skip 'no flake8'
filter="(undefined name '(Inotify|IN_[A-Z_]+)')" # inotify.py get pasted together with other files
! find_python_files | xargs -r -0 flake8 2>&1 | grep -Ev "${filter}"
find_python_files | xargs -r -0 flake8
}
test_pyvulture() {