Removing superfluous imports and variable

Several of our modules have accumulated unused statements, mostly imports,
unused in the rest of the code and without any apparent purpose.

While not compromising functionality of our code directly,
they needlessly increase our cognitive load, and can potentially,
in absence of proper mitigation, introduce issues down the line.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I03da08a195a8468e4056522878ba3b391a368e14
This commit is contained in:
Jiri Podivin 2022-09-12 12:04:15 +02:00
parent 5076004733
commit 3a3ea531e6
8 changed files with 1 additions and 21 deletions

View File

@ -32,7 +32,6 @@ except ImportError:
JUNIT_XML_FOUND = False
from validations_libs.cli import colors
from validations_libs import utils
# Handle backward compatibility for Cliff 2.16.0 in stable/train:
if hasattr(_argparse, 'SmartHelpFormatter'):

View File

@ -51,7 +51,6 @@ class ListHistory(BaseLister):
# Merge config and CLI args:
self.base.set_argument_parser(self, parsed_args)
validation_log_dir = parsed_args.validation_log_dir
history_limit = parsed_args.history_limit
if history_limit < 1:

View File

@ -17,14 +17,6 @@ import sys
from unittest import TestCase
from validations_libs.cli import app
from validations_libs.cli import base
from validations_libs import utils
try:
from unittest import mock
except ImportError:
import mock
class BaseCommand(TestCase):

View File

@ -17,7 +17,6 @@ try:
from unittest import mock
except ImportError:
import mock
from unittest import TestCase
from validations_libs.cli import lister
from validations_libs.cli import base

View File

@ -12,10 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
#
try:
from unittest import mock
except ImportError:
import mock
from unittest import TestCase
from validations_libs.cli import colors

View File

@ -19,9 +19,6 @@ except ImportError:
from validations_libs.cli import community
from validations_libs.cli import base
from validations_libs.community.init_validation import \
CommunityValidation as cv
from validations_libs.tests import fakes
from validations_libs.tests.cli.fakes import BaseCommand

View File

@ -17,8 +17,6 @@ try:
except ImportError:
import mock
from validations_libs import group
from validations_libs.validation_actions import ValidationActions
from validations_libs.cli import show
from validations_libs.tests import fakes
from validations_libs.tests.cli.fakes import BaseCommand

View File

@ -22,7 +22,6 @@ import site
import subprocess
import uuid
from os.path import join
# @matbu backward compatibility for stable/train
try:
from pathlib import Path