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)$
|
||||
args: ['--unsafe']
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.11.2
|
||||
rev: v0.11.8
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: ['--fix', '--unsafe-fixes']
|
||||
|
@ -21,7 +21,6 @@ import getpass
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import typing as ty
|
||||
|
||||
from cliff import columns as cliff_columns
|
||||
import iso8601
|
||||
@ -1874,7 +1873,7 @@ class CreateServer(command.ShowOne):
|
||||
|
||||
# Default to empty list if nothing was specified and let nova
|
||||
# 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 len(parsed_args.nics) > 1:
|
||||
|
@ -94,7 +94,7 @@ class OpenStackShell(shell.OpenStackShell):
|
||||
# instead.
|
||||
mod_versions = getattr(mod, 'API_VERSIONS', None)
|
||||
if mod_versions is not None and not isinstance(
|
||||
mod_versions, (dict, tuple)
|
||||
mod_versions, dict | tuple
|
||||
):
|
||||
raise TypeError(
|
||||
f'Plugin {mod} has incompatible API_VERSIONS. '
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
import copy
|
||||
import random
|
||||
import typing as ty
|
||||
from unittest import mock
|
||||
import uuid
|
||||
|
||||
@ -92,7 +91,7 @@ class FakeClientMixin:
|
||||
self.volume_sdk_client = self.app.client_manager.sdk_connection.volume
|
||||
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.
|
||||
|
||||
:param version: The fake microversion to "support". This must be None
|
||||
|
@ -1,5 +1,5 @@
|
||||
[tool.mypy]
|
||||
python_version = "3.9"
|
||||
python_version = "3.10"
|
||||
show_column_numbers = true
|
||||
show_error_context = true
|
||||
ignore_missing_imports = true
|
||||
@ -22,6 +22,7 @@ ignore_errors = true
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 79
|
||||
target-version = "py310"
|
||||
|
||||
[tool.ruff.format]
|
||||
quote-style = "preserve"
|
||||
|
Loading…
x
Reference in New Issue
Block a user