Merge "mypy: Cleanup "noqa: H301" comments"

This commit is contained in:
Zuul 2023-12-18 19:38:37 +00:00 committed by Gerrit Code Review
commit befc7277a1
26 changed files with 30 additions and 27 deletions

View File

@ -13,7 +13,7 @@
from __future__ import annotations
import typing
from typing import Any, Generator, Iterable, Optional, Union # noqa: H301
from typing import Any, Generator, Iterable, Optional, Union
from keystoneauth1 import exceptions as ks_exc
from keystoneauth1 import identity

View File

@ -20,7 +20,7 @@ import json
import os
import re
import typing
from typing import Any, Iterable, Optional, Union # noqa: H301
from typing import Any, Iterable, Optional, Union
import urllib
from oslo_config import cfg

View File

@ -48,7 +48,7 @@ import os
import re
import subprocess
import time
from typing import Dict, List, Optional, Tuple # noqa: H301
from typing import Dict, List, Optional, Tuple
import eventlet
from os_brick.initiator import linuxrbd

View File

@ -63,7 +63,7 @@ import re
import sys
import time
import typing
from typing import Any, Callable, Optional, Tuple, Union # noqa: H301
from typing import Any, Callable, Optional, Tuple, Union
from oslo_config import cfg
from oslo_db import exception as db_exc

View File

@ -20,7 +20,7 @@
from __future__ import annotations
import copy
from typing import Any, Optional # noqa: H301
from typing import Any, Optional
from keystoneauth1.access import service_catalog as ksa_service_catalog
from keystoneauth1 import plugin

View File

@ -21,7 +21,7 @@ import inspect
import os
import re
import sys
from typing import Callable, Optional # noqa: H301
from typing import Callable, Optional
import uuid
import decorator

View File

@ -22,7 +22,7 @@ SHOULD include dedicated exception logging.
"""
from typing import Optional, Union # noqa: H301
from typing import Optional, Union
from oslo_log import log as logging
from oslo_versionedobjects import exception as obj_exc

View File

@ -13,7 +13,7 @@
from __future__ import annotations
import os
from typing import Any, Optional # noqa: H301
from typing import Any, Optional
from oslo_log import log as logging
# For more information please visit: https://wiki.openstack.org/wiki/TaskFlow

View File

@ -25,7 +25,7 @@ import shutil
import sys
import textwrap
import time
from typing import (Any, Callable, Iterable, NoReturn, Optional) # noqa: H301
from typing import (Any, Callable, Iterable, NoReturn, Optional)
import urllib
import urllib.parse

View File

@ -32,7 +32,7 @@ import math
import os
import re
import tempfile
from typing import ContextManager, Generator, Optional # noqa: H301
from typing import ContextManager, Generator, Optional
import cryptography
from cursive import exception as cursive_exception

View File

@ -17,7 +17,7 @@
import sys
import typing
from typing import Optional, Type # noqa: H301
from typing import Optional, Type
from oslo_config import cfg
from oslo_log import log as logging

View File

@ -20,7 +20,7 @@ Pluggable Weighing support
from __future__ import annotations
import abc
from typing import Iterable, Optional # noqa: H301
from typing import Iterable, Optional
from oslo_log import log as logging

View File

@ -22,7 +22,7 @@ Weighing Functions.
from __future__ import annotations
from typing import (Optional, Union) # noqa: H301
from typing import (Optional, Union)
from oslo_config import cfg
from oslo_log import log as logging

View File

@ -12,7 +12,7 @@
from __future__ import annotations # Remove when only supporting python 3.9+
from typing import Any, Optional # noqa: H301
from typing import Any, Optional
from oslo_log import log as logging
from oslo_utils import excutils

View File

@ -20,7 +20,7 @@ from __future__ import annotations
from collections import abc
import random
import typing
from typing import (Any, Iterable, Optional, Type, Union) # noqa: H301
from typing import (Any, Iterable, Optional, Type, Union)
from oslo_config import cfg
from oslo_log import log as logging

View File

@ -44,8 +44,8 @@ import stat
import sys
import tempfile
import typing
from typing import Callable, Iterable, Iterator # noqa: H301
from typing import Optional, Type, Union # noqa: H301
from typing import Callable, Iterable, Iterator
from typing import Optional, Type, Union
import eventlet
from eventlet import tpool

View File

@ -21,7 +21,7 @@ from __future__ import annotations
import ast
import collections
import datetime
from typing import (Any, DefaultDict, Iterable, Optional, Union) # noqa: H301
from typing import (Any, DefaultDict, Iterable, Optional, Union)
from castellan import key_manager
from oslo_config import cfg

View File

@ -23,7 +23,7 @@ import math
import os
import tempfile
import typing
from typing import Any, Optional, Union # noqa: H301
from typing import Any, Optional, Union
import urllib.parse
from castellan import key_manager

View File

@ -27,7 +27,7 @@ import string
import tempfile
import time
import typing
from typing import Callable, List, Optional, Tuple, Union # noqa: H301
from typing import Callable, List, Optional, Tuple, Union
from castellan import key_manager
from os_brick.remotefs import remotefs as remotefs_brick

View File

@ -13,7 +13,7 @@
from __future__ import annotations # Remove when only supporting python 3.9+
from typing import Any, Optional, Type, Union # noqa: H301
from typing import Any, Optional, Type, Union
from oslo_config import cfg
from oslo_log import log as logging

View File

@ -15,7 +15,7 @@ from __future__ import annotations
import binascii
import traceback
import typing
from typing import Any, Optional # noqa: H301
from typing import Any, Optional
from castellan import key_manager
import os_brick.initiator.connectors

View File

@ -40,7 +40,7 @@ from __future__ import annotations # Remove when only supporting Python 3.9+
import functools
import time
import typing
from typing import Any, Optional, Union # noqa: H301
from typing import Any, Optional, Union
from castellan import key_manager
from oslo_config import cfg

View File

@ -14,7 +14,7 @@
from __future__ import annotations
from typing import Optional, Union # noqa: H301
from typing import Optional, Union
from cinder.common import constants
from cinder import context

View File

@ -21,7 +21,7 @@
from __future__ import annotations
from typing import Any, Iterable, Optional, Union # noqa: H301
from typing import Any, Iterable, Optional, Union
from oslo_config import cfg
from oslo_db import exception as db_exc

View File

@ -33,8 +33,8 @@ import tempfile
import time
import types
import typing
from typing import Any, BinaryIO, Callable, IO # noqa: H301
from typing import Optional, Union # noqa: H301
from typing import Any, BinaryIO, Callable, IO
from typing import Optional, Union
import uuid
from castellan.common.credentials import keystone_password

View File

@ -285,3 +285,6 @@ deps = -r{toxinidir}/requirements.txt
ruff
commands =
ruff {toxinidir}/cinder {posargs}
[hacking]
import_exceptions = typing