diff --git a/os_brick/exception.py b/os_brick/exception.py index 87367e423..a002bbc08 100644 --- a/os_brick/exception.py +++ b/os_brick/exception.py @@ -17,7 +17,7 @@ from __future__ import annotations import traceback -from typing import Any, Optional # noqa: H301 +from typing import Any, Optional from oslo_concurrency import processutils as putils from oslo_log import log as logging diff --git a/os_brick/initiator/connectors/base_iscsi.py b/os_brick/initiator/connectors/base_iscsi.py index f20dcdf37..3e955ccd5 100644 --- a/os_brick/initiator/connectors/base_iscsi.py +++ b/os_brick/initiator/connectors/base_iscsi.py @@ -15,7 +15,7 @@ from __future__ import annotations import copy -from typing import Any, Generator # noqa: H301 +from typing import Any, Generator from os_brick.initiator import initiator_connector diff --git a/os_brick/initiator/connectors/base_rbd.py b/os_brick/initiator/connectors/base_rbd.py index cb35b3a9f..54c48f01b 100644 --- a/os_brick/initiator/connectors/base_rbd.py +++ b/os_brick/initiator/connectors/base_rbd.py @@ -15,7 +15,7 @@ from __future__ import annotations -from typing import Any, Optional # noqa: H301 +from typing import Any, Optional from oslo_log import log as logging from oslo_utils import netutils diff --git a/os_brick/initiator/connectors/fibre_channel.py b/os_brick/initiator/connectors/fibre_channel.py index 96abe7759..38ccac7c5 100644 --- a/os_brick/initiator/connectors/fibre_channel.py +++ b/os_brick/initiator/connectors/fibre_channel.py @@ -16,7 +16,7 @@ from __future__ import annotations import os import typing -from typing import Any, Optional # noqa: H301 +from typing import Any, Optional from oslo_log import log as logging from oslo_service import loopingcall diff --git a/os_brick/initiator/connectors/iscsi.py b/os_brick/initiator/connectors/iscsi.py index 0eee607d3..22a718294 100644 --- a/os_brick/initiator/connectors/iscsi.py +++ b/os_brick/initiator/connectors/iscsi.py @@ -20,7 +20,7 @@ import glob import os import re import time -from typing import Any, Iterable, Optional, Union # noqa: H301 +from typing import Any, Iterable, Optional, Union from oslo_concurrency import processutils as putils from oslo_log import log as logging diff --git a/os_brick/initiator/connectors/nvmeof.py b/os_brick/initiator/connectors/nvmeof.py index a140a7295..70e584e47 100644 --- a/os_brick/initiator/connectors/nvmeof.py +++ b/os_brick/initiator/connectors/nvmeof.py @@ -21,7 +21,7 @@ import glob import json import os.path import time -from typing import (Callable, Optional, Sequence, Type, Union) # noqa: H301 +from typing import (Callable, Optional, Sequence, Type, Union) import uuid as uuid_lib from oslo_concurrency import processutils as putils diff --git a/os_brick/initiator/connectors/rbd.py b/os_brick/initiator/connectors/rbd.py index b3d775418..06d08b569 100644 --- a/os_brick/initiator/connectors/rbd.py +++ b/os_brick/initiator/connectors/rbd.py @@ -15,7 +15,7 @@ from __future__ import annotations import os import tempfile import typing -from typing import Any, Optional, Union # noqa: H301 +from typing import Any, Optional, Union if typing.TYPE_CHECKING: import io diff --git a/os_brick/initiator/connectors/remotefs.py b/os_brick/initiator/connectors/remotefs.py index bed416f2e..3142c5609 100644 --- a/os_brick/initiator/connectors/remotefs.py +++ b/os_brick/initiator/connectors/remotefs.py @@ -14,7 +14,7 @@ from __future__ import annotations -from typing import Any, Callable # noqa: H301 +from typing import Any, Callable from oslo_log import log as logging diff --git a/os_brick/initiator/linuxrbd.py b/os_brick/initiator/linuxrbd.py index 4546cf97c..9f2d64eb5 100644 --- a/os_brick/initiator/linuxrbd.py +++ b/os_brick/initiator/linuxrbd.py @@ -15,7 +15,7 @@ from __future__ import annotations import io -from typing import NoReturn, Optional # noqa: H301 +from typing import NoReturn, Optional from oslo_log import log as logging diff --git a/os_brick/local_dev/lvm.py b/os_brick/local_dev/lvm.py index 9adc0304d..175b35173 100644 --- a/os_brick/local_dev/lvm.py +++ b/os_brick/local_dev/lvm.py @@ -20,7 +20,7 @@ from __future__ import annotations import math import os import re -from typing import Any, Callable, Optional # noqa: H301 +from typing import Any, Callable, Optional from oslo_concurrency import processutils as putils from oslo_log import log as logging diff --git a/os_brick/privileged/nvmeof.py b/os_brick/privileged/nvmeof.py index b367badd5..418b319ef 100644 --- a/os_brick/privileged/nvmeof.py +++ b/os_brick/privileged/nvmeof.py @@ -17,7 +17,7 @@ from __future__ import annotations import errno import os -from typing import Optional # noqa: H301 +from typing import Optional from oslo_concurrency import processutils as putils from oslo_log import log as logging diff --git a/os_brick/utils.py b/os_brick/utils.py index f31e27054..95568b4b8 100644 --- a/os_brick/utils.py +++ b/os_brick/utils.py @@ -19,7 +19,7 @@ import inspect import logging as py_logging import os import time -from typing import Any, Callable, Optional, Type, Union # noqa: H301 +from typing import Any, Callable, Optional, Type, Union import uuid as uuid_lib from oslo_concurrency import processutils diff --git a/tox.ini b/tox.ini index 234fb0247..c3ce9671a 100644 --- a/tox.ini +++ b/tox.ini @@ -141,7 +141,7 @@ ignore-path=.tox,*.egg-info,doc/src/api,doc/source/drivers.rst,doc/build,.eggs/* extension=.txt,.rst,.inc [hacking] -import_exceptions = os_brick.i18n +import_exceptions = os_brick.i18n, typing [testenv:bindep] # Do not install any requirements. We want this to be fast and work even if