]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use more liberal flake8 for tests
authorPetr Špaček <pspacek@isc.org>
Wed, 23 Jun 2021 08:57:14 +0000 (10:57 +0200)
committerPetr Špaček <pspacek@isc.org>
Mon, 8 Nov 2021 12:23:05 +0000 (13:23 +0100)
Ignore rule W402 (wrong import order) to enable use of
pytest.importorskip.

.gitlab-ci.yml

index 8e8f056441e1f9c373105b07a14b84044eed6561..6d29d5dbcd3a7e8aaba76db510a5805f9f0e2ee3 100644 (file)
@@ -481,7 +481,9 @@ flake8:
       artifacts: true
   script:
     - *configure
-    - flake8 --max-line-length=80 $(git ls-files '*.py' | grep -vE '(ans\.py|dangerfile\.py)')
+    - flake8 --max-line-length=80 $(git ls-files '*.py' | grep -vE '(ans\.py|dangerfile\.py|^bin/tests/system/)')
+      # Ignore Flake8 E402 error (module level import not at top of file) in system test to enable use of pytest.importorskip
+    - flake8 --max-line-length=80 --extend-ignore=E402 $(git ls-files 'bin/tests/system/*.py' | grep -vE 'ans\.py')
 
 pylint:
   <<: *default_triggering_rules