From 53fd545f77e149acb8fdfd4f8e80a9dfa47c103d Mon Sep 17 00:00:00 2001 From: Pierre Lalet Date: Mon, 5 May 2025 21:39:25 +0200 Subject: [PATCH] CI: apply flake8 fixes --- test/src/core.py | 4 +--- test/test_masscanned.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/test/src/core.py b/test/src/core.py index 35681e6..829f314 100644 --- a/test/src/core.py +++ b/test/src/core.py @@ -1,5 +1,5 @@ # This file is part of masscanned. -# Copyright 2021 - The IVRE project +# Copyright 2021 - 2025 - The IVRE project # # Masscanned is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -39,7 +39,6 @@ ERRORS = [] # decorator to automatically add a function to tests def test(f): - global ERRORS, TESTS OK = "\033[1mOK\033[0m" KO = "\033[1m\033[1;%dmKO\033[0m" % 31 fname = f.__name__.ljust(50, ".") @@ -61,7 +60,6 @@ def test(f): def test_all(m): - global ERRORS, TESTS # execute tests for t in TESTS: # perform unit test diff --git a/test/test_masscanned.py b/test/test_masscanned.py index 5b32e5f..e3b37a6 100755 --- a/test/test_masscanned.py +++ b/test/test_masscanned.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # This file is part of masscanned. -# Copyright 2021 - The IVRE project +# Copyright 2021 - 2025 - The IVRE project # # Masscanned is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -39,7 +39,6 @@ from src.conf import IPV4_ADDR, IPV6_ADDR, MAC_ADDR, OUTDIR def cleanup_net(iface): - global ipfile subprocess.check_call(["ip", "link", "delete", iface]) subprocess.check_call( [ @@ -64,7 +63,6 @@ def cleanup_net(iface): def setup_net(iface): - global IPV4_ADDR # create the interfaces pair atexit.register(functools.partial(cleanup_net, f"{iface}a")) subprocess.check_call(