Fix linter errors

Mostly wrong import order, useless imports, etc.
This commit is contained in:
Pavel Raiskup 2024-10-03 08:13:04 +02:00 committed by Jakub Kadlčík
parent cf1524495d
commit f39b3d620d
4 changed files with 18 additions and 15 deletions

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python3
#
# Copyright (c) 2008-2009 Red Hat, Inc.
#
@ -19,6 +19,7 @@ import os
import shutil
import sys
import tempfile
import nose
# Make sure we run from the source, this is tricky because the functional
# tests need to find both the location of the 'tito' executable script,
@ -34,7 +35,6 @@ SRC_BIN_DIR = os.path.abspath(os.path.join(TEST_SCRIPT_DIR, "bin/"))
os.environ['TITO_SRC_BIN_DIR'] = SRC_BIN_DIR
if __name__ == '__main__':
import nose
print("Using Python %s" % sys.version)
print("Using nose %s" % nose.__version__)

View file

@ -15,12 +15,12 @@
Functional Tests for the CoprReleaser.
"""
from unittest import mock
from functional.fixture import TitoGitTestFixture
from unittest import mock
from tito.compat import * # NOQA
from tito.release import CoprReleaser
from unit import Capture
PKG_NAME = "releaseme"

View file

@ -1,7 +1,8 @@
import unittest
from tito.bugtracker import BugzillaExtractor
from unittest.mock import Mock, patch
from tito.bugtracker import BugzillaExtractor
class ExtractBugzillasTest(unittest.TestCase):

View file

@ -1,4 +1,3 @@
#
# Copyright (c) 2008-2009 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
@ -13,6 +12,18 @@
# in this software or its documentation.
""" Pure unit tests for tito's common module. """
import os
import re
import unittest
from unittest.mock import patch, call
from tempfile import NamedTemporaryFile
from textwrap import dedent
from unit import open_mock, Capture
from blessed import Terminal
# Pure unit tests for tito's common module
from tito.common import (replace_version, find_spec_like_file, increase_version,
search_for, compare_version, run_command_print, find_wrote_in_rpmbuild_output,
render_cheetah, increase_zstream, reset_release, find_file_with_extension,
@ -23,15 +34,6 @@ from tito.common import (replace_version, find_spec_like_file, increase_version,
from tito.compat import StringIO
from tito.tagger import CargoBump
import os
import re
import unittest
from unittest.mock import Mock, patch, call
from tempfile import NamedTemporaryFile
from textwrap import dedent
from unit import open_mock, Capture
from blessed import Terminal
class CommonTests(unittest.TestCase):