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:
parent
5076004733
commit
3a3ea531e6
@ -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'):
|
||||
|
@ -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:
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user