Bump Python version used for linters to 3.10
Change-Id: I693516fc2a08218c50d83a3ab121b51254f97958 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
ce2a253d5a
commit
7c7c066096
@ -15,7 +15,7 @@ repos:
|
|||||||
files: .*\.(yaml|yml)$
|
files: .*\.(yaml|yml)$
|
||||||
args: ['--unsafe']
|
args: ['--unsafe']
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.11.2
|
rev: v0.11.8
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
args: ['--fix', '--unsafe-fixes']
|
args: ['--fix', '--unsafe-fixes']
|
||||||
|
@ -21,7 +21,6 @@ import getpass
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import typing as ty
|
|
||||||
|
|
||||||
from cliff import columns as cliff_columns
|
from cliff import columns as cliff_columns
|
||||||
import iso8601
|
import iso8601
|
||||||
@ -1874,7 +1873,7 @@ class CreateServer(command.ShowOne):
|
|||||||
|
|
||||||
# Default to empty list if nothing was specified and let nova
|
# Default to empty list if nothing was specified and let nova
|
||||||
# decide the default behavior.
|
# decide the default behavior.
|
||||||
networks: ty.Union[str, list[dict[str, str]], None] = []
|
networks: str | list[dict[str, str]] | None = []
|
||||||
|
|
||||||
if 'auto' in parsed_args.nics or 'none' in parsed_args.nics:
|
if 'auto' in parsed_args.nics or 'none' in parsed_args.nics:
|
||||||
if len(parsed_args.nics) > 1:
|
if len(parsed_args.nics) > 1:
|
||||||
|
@ -94,7 +94,7 @@ class OpenStackShell(shell.OpenStackShell):
|
|||||||
# instead.
|
# instead.
|
||||||
mod_versions = getattr(mod, 'API_VERSIONS', None)
|
mod_versions = getattr(mod, 'API_VERSIONS', None)
|
||||||
if mod_versions is not None and not isinstance(
|
if mod_versions is not None and not isinstance(
|
||||||
mod_versions, (dict, tuple)
|
mod_versions, dict | tuple
|
||||||
):
|
):
|
||||||
raise TypeError(
|
raise TypeError(
|
||||||
f'Plugin {mod} has incompatible API_VERSIONS. '
|
f'Plugin {mod} has incompatible API_VERSIONS. '
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
import copy
|
import copy
|
||||||
import random
|
import random
|
||||||
import typing as ty
|
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
@ -92,7 +91,7 @@ class FakeClientMixin:
|
|||||||
self.volume_sdk_client = self.app.client_manager.sdk_connection.volume
|
self.volume_sdk_client = self.app.client_manager.sdk_connection.volume
|
||||||
self.set_volume_api_version() # default to the lowest
|
self.set_volume_api_version() # default to the lowest
|
||||||
|
|
||||||
def set_volume_api_version(self, version: ty.Optional[str] = None):
|
def set_volume_api_version(self, version: str | None = None):
|
||||||
"""Set a fake block storage API version.
|
"""Set a fake block storage API version.
|
||||||
|
|
||||||
:param version: The fake microversion to "support". This must be None
|
:param version: The fake microversion to "support". This must be None
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
python_version = "3.9"
|
python_version = "3.10"
|
||||||
show_column_numbers = true
|
show_column_numbers = true
|
||||||
show_error_context = true
|
show_error_context = true
|
||||||
ignore_missing_imports = true
|
ignore_missing_imports = true
|
||||||
@ -22,6 +22,7 @@ ignore_errors = true
|
|||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
line-length = 79
|
line-length = 79
|
||||||
|
target-version = "py310"
|
||||||
|
|
||||||
[tool.ruff.format]
|
[tool.ruff.format]
|
||||||
quote-style = "preserve"
|
quote-style = "preserve"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user