Remove unneeded "import typing" and "noqa"

Some "import typing  # noqa" lines were not needed because typing was
not used on those modules.

And some other imports had been tagged with # noqa and it was not needed
either.

Change-Id: I06e01f5ad25264f5e811a4ada2a1881303b0e88c
This commit is contained in:
Eduardo Olivares 2025-03-26 15:01:30 +01:00
parent 9efa8d928e
commit 801497f5a4
16 changed files with 15 additions and 17 deletions

View File

@ -20,7 +20,7 @@ import setuptools
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
import multiprocessing # noqa
import multiprocessing
except ImportError:
pass

View File

@ -16,7 +16,7 @@ from __future__ import absolute_import
import contextlib
import collections
import sys
import typing # noqa
import typing
from oslo_log import log
import testtools

View File

@ -16,7 +16,6 @@
from __future__ import absolute_import
import os
import typing # noqa
import tobiko
from tobiko.shell import ping

View File

@ -15,7 +15,7 @@
# under the License.
from __future__ import absolute_import
import typing # noqa
import typing
from urllib import parse
import netaddr

View File

@ -16,7 +16,7 @@
from __future__ import absolute_import
import math
import typing # noqa
import typing
import tobiko
from tobiko.shell import sh

View File

@ -15,7 +15,7 @@
# under the License.
from __future__ import absolute_import
import typing # noqa
import typing
import tobiko
from tobiko.shell import sh

View File

@ -15,7 +15,6 @@
# under the License.
from __future__ import absolute_import
import typing # noqa
from os.path import expanduser
from oslo_log import log

View File

@ -18,7 +18,7 @@ from __future__ import absolute_import
import io
import os
import time
import typing # noqa
import typing
from multiprocessing import Process as MultiProcess
import psutil

View File

@ -14,7 +14,6 @@
from __future__ import absolute_import
import enum
import typing # noqa
from oslo_log import log

View File

@ -28,7 +28,7 @@ from tobiko.shell.sh import _io
from tobiko.shell.sh import _local
from tobiko.shell.sh import _process
from tobiko.shell import ssh
import typing # noqa
LOG = log.getLogger(__name__)

View File

@ -15,9 +15,10 @@
# under the License.
from __future__ import absolute_import
import typing
import netaddr
from oslo_log import log
import typing # noqa
import tobiko
from tobiko.shell import sh

View File

@ -15,7 +15,7 @@
# under the License.
from __future__ import absolute_import
import typing # noqa
import typing
from functools import wraps
import netaddr

View File

@ -22,7 +22,7 @@ TOP_DIR = os.path.realpath(os.path.dirname(os.path.dirname(__file__)))
if TOP_DIR not in sys.path:
sys.path.insert(0, TOP_DIR)
from tools import common # noqa
from tools import common
def main():

View File

@ -24,8 +24,8 @@ TOP_DIR = os.path.realpath(os.path.dirname(os.path.dirname(__file__)))
if TOP_DIR not in sys.path:
sys.path.insert(0, TOP_DIR)
from tools import common # noqa
from tools import get_version # noqa
from tools import common
from tools import get_version
LOG = common.get_logger(__name__)

View File

@ -26,7 +26,7 @@ TOP_DIR = os.path.dirname(os.path.dirname(__file__))
if TOP_DIR not in sys.path:
sys.path.insert(0, TOP_DIR)
from tools import common # noqa
from tools import common
LOG = common.get_logger(__name__)

View File

@ -21,7 +21,7 @@ TOP_DIR = os.path.dirname(os.path.dirname(__file__))
if TOP_DIR not in sys.path:
sys.path.insert(0, TOP_DIR)
from tools import common # noqa
from tools import common
LOG = common.get_logger(__name__)