From e252a4ea1ec65643e63311d8cb8a8d3b883b84be Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Fri, 4 Oct 2024 15:53:33 +0200 Subject: [PATCH] lint: fix errors that appear to be new in #504 --- test/functional/build_gitannex_tests.py | 2 +- test/functional/fetch_tests.py | 5 +++-- test/functional/release_copr_tests.py | 2 +- test/functional/release_yum_tests.py | 4 ++-- test/unit/pep8_tests.py | 8 ++++---- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/test/functional/build_gitannex_tests.py b/test/functional/build_gitannex_tests.py index 0abb9428..cb536101 100644 --- a/test/functional/build_gitannex_tests.py +++ b/test/functional/build_gitannex_tests.py @@ -25,7 +25,7 @@ from functional.fixture import TitoGitTestFixture, tito -from tito.compat import * # NOQA +from tito.compat import (getstatusoutput, RawConfigParser) from tito.common import run_command from tito.builder import GitAnnexBuilder diff --git a/test/functional/fetch_tests.py b/test/functional/fetch_tests.py index 709d5414..e1828205 100644 --- a/test/functional/fetch_tests.py +++ b/test/functional/fetch_tests.py @@ -23,11 +23,12 @@ from os.path import join -from tito.common import run_command -from tito.compat import * # NOQA from functional.fixture import TitoGitTestFixture, tito from unit import Capture, is_epel6, is_rawhide, skip_if_rpmbuild +from tito.common import run_command +from tito.compat import RawConfigParser + if is_epel6: import unittest2 as unittest else: diff --git a/test/functional/release_copr_tests.py b/test/functional/release_copr_tests.py index 7086c806..2a30027a 100644 --- a/test/functional/release_copr_tests.py +++ b/test/functional/release_copr_tests.py @@ -21,7 +21,7 @@ from unit import titodir -from tito.compat import * # NOQA +from tito.compat import RawConfigParser from tito.release import CoprReleaser PKG_NAME = "releaseme" diff --git a/test/functional/release_yum_tests.py b/test/functional/release_yum_tests.py index 74e81b9b..cd59de4e 100644 --- a/test/functional/release_yum_tests.py +++ b/test/functional/release_yum_tests.py @@ -19,19 +19,19 @@ import os import shutil import tempfile +import sys from os.path import join from functional.fixture import TitoGitTestFixture, tito -from tito.compat import * # NOQA +from tito.compat import RawConfigParser from tito.common import run_command # There is not many simple options to check on what distribution this is running. # Fortunately, we only need to check for Fedora Rawhide and EPEL6, so we can # determine it from python version. This is compatible for all distributions. -import sys is_rawhide = sys.version_info[:2] >= (3, 8) is_epel6 = sys.version_info[:2] == (2, 6) diff --git a/test/unit/pep8_tests.py b/test/unit/pep8_tests.py index cffbc414..eac6fe07 100644 --- a/test/unit/pep8_tests.py +++ b/test/unit/pep8_tests.py @@ -21,6 +21,9 @@ http://docs.python.org/3.3/reference/lexical_analysis.html """ +import os +import unittest + try: # python-pep8 package is retired in Fedora because upstream # moved to pycodestyle. Please see @@ -29,13 +32,10 @@ except ImportError: import pycodestyle as pep8 - -import unittest - from unit.fixture import TitoUnitTestFixture, REPO_DIR from unit import skip_if_tox -from tito.compat import * # NOQA +from tito.compat import getoutput from tito.compat import StringIO, redirect_stdout