]> 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>
Tue, 9 Nov 2021 12:13:51 +0000 (13:13 +0100)
Ignore rule W402 (wrong import order) to enable use of
pytest.importorskip.

(cherry picked from commit 1a80e641e9085d25892bed17866d38e525cd3588)

.gitlab-ci.yml

index 16c4e0a10f957447fc54cd58fe8640b01867cfba..b768ee695a74cca141d028a82dc3ba6879db215d 100644 (file)
@@ -512,7 +512,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