From ba4fca67eb706e5586b63133ee4de2b7c581eef5 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Wed, 15 Nov 2023 12:16:37 -0500 Subject: [PATCH] mypy: Cleanup "noqa: H301" comments We decided that H301 makes no sense for the "typing" module, just set that in tox.ini instead of every time it is used. Change-Id: Ie209a7bc1b0c8fd55725de8ca3fac147b9735614 --- os_brick/exception.py | 2 +- os_brick/initiator/connectors/base_iscsi.py | 2 +- os_brick/initiator/connectors/base_rbd.py | 2 +- os_brick/initiator/connectors/fibre_channel.py | 2 +- os_brick/initiator/connectors/iscsi.py | 2 +- os_brick/initiator/connectors/nvmeof.py | 2 +- os_brick/initiator/connectors/rbd.py | 2 +- os_brick/initiator/connectors/remotefs.py | 2 +- os_brick/initiator/linuxrbd.py | 2 +- os_brick/local_dev/lvm.py | 2 +- os_brick/privileged/nvmeof.py | 2 +- os_brick/utils.py | 2 +- tox.ini | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) 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 36b0cd758..b6380b672 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 2e4abe78d..00d88c00a 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 7cb46df63..c27d17b95 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 5432530c6..e63b041d3 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 0a45aca6c..2b3715a78 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 8330c9b29..b0eb2396c 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 7ffb4794a..4cf6c91ac 100644 --- a/tox.ini +++ b/tox.ini @@ -139,7 +139,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