Update pre-commit hooks
Change-Id: I93d5520bc67135db9b0ac9da40dbfb587cb9acad Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
This commit is contained in:
@@ -4,7 +4,7 @@ default_language_version:
|
||||
python: python3
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.6.0
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: mixed-line-ending
|
||||
@@ -18,11 +18,11 @@ repos:
|
||||
files: .*\.(yaml|yml)$
|
||||
exclude: '^zuul.d/.*$'
|
||||
- repo: https://github.com/PyCQA/doc8
|
||||
rev: v1.1.1
|
||||
rev: v1.1.2
|
||||
hooks:
|
||||
- id: doc8
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.6.7
|
||||
rev: v0.11.12
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: ['--fix', '--unsafe-fixes']
|
||||
@@ -34,7 +34,7 @@ repos:
|
||||
# args: ['-l', '79']
|
||||
# exclude: '^codegenerator/templates/.*$'
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.11.2
|
||||
rev: v1.16.0
|
||||
hooks:
|
||||
- id: mypy
|
||||
language: python
|
||||
|
@@ -220,7 +220,7 @@ def main():
|
||||
metadata_path = Path(args.metadata)
|
||||
generator.load_metadata(metadata_path)
|
||||
# Resulting mod_paths
|
||||
res_mods: list[tuple[list[str | None], str, str, str | None]] = []
|
||||
res_mods: list[tuple[list[str], str, str, str | None]] = []
|
||||
|
||||
for res, res_data in generator.metadata.resources.items():
|
||||
if args.service and not res.startswith(args.service):
|
||||
@@ -235,7 +235,7 @@ def main():
|
||||
else args.target
|
||||
)
|
||||
if metadata_target in op_data.targets:
|
||||
op_args = op_data.targets[metadata_target]
|
||||
op_args = op_data.targets[metadata_target] # type: ignore
|
||||
if not op_args.service_type:
|
||||
op_args.service_type = res.split(".")[0]
|
||||
if not op_args.api_version:
|
||||
@@ -271,9 +271,13 @@ def main():
|
||||
res_mods.append(
|
||||
(
|
||||
[
|
||||
res_x[0].replace("-", "_"),
|
||||
res_data.api_version,
|
||||
res_x[1],
|
||||
x
|
||||
for x in [
|
||||
res_x[0].replace("-", "_"),
|
||||
res_data.api_version,
|
||||
res_x[1],
|
||||
]
|
||||
if x
|
||||
],
|
||||
mod,
|
||||
"",
|
||||
|
@@ -31,7 +31,7 @@ OPERATION_TYPE = Literal[
|
||||
"find",
|
||||
]
|
||||
|
||||
SUPPORTED_TARGETS = Literal["rust-sdk", "rust-cli", "rust-tui"]
|
||||
SUPPORTED_TARGETS = Literal["rust-sdk", "rust-cli", "rust-tui", "rust-types"]
|
||||
|
||||
|
||||
class OperationTargetParams(BaseModel):
|
||||
|
Reference in New Issue
Block a user