Skip to content

Commit 99ed71f

Browse files
committed
style: apply Python 3.10+ type annotation modernization
- Import Callable from collections.abc instead of typing (PEP 585) - Use X | Y syntax instead of Optional[X] for union types (PEP 604) - Remove unused Optional import - Auto-fixed by ruff with UP035 and UP007 rules
1 parent 9da492f commit 99ed71f

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/hier_config_cli/__main__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import json
44
import logging
55
import sys
6+
from collections.abc import Callable
67
from pathlib import Path
7-
from typing import Any, Callable, Optional, TypeVar
8+
from typing import Any, TypeVar
89

910
import click
1011
import yaml
@@ -245,7 +246,7 @@ def remediation(
245246
running_config: str,
246247
generated_config: str,
247248
output_format: str,
248-
output_file: Optional[str],
249+
output_file: str | None,
249250
) -> None:
250251
"""Generate the remediation configuration.
251252
@@ -284,7 +285,7 @@ def rollback(
284285
running_config: str,
285286
generated_config: str,
286287
output_format: str,
287-
output_file: Optional[str],
288+
output_file: str | None,
288289
) -> None:
289290
"""Generate the rollback configuration.
290291
@@ -321,7 +322,7 @@ def future(
321322
running_config: str,
322323
generated_config: str,
323324
output_format: str,
324-
output_file: Optional[str],
325+
output_file: str | None,
325326
) -> None:
326327
"""Generate the future configuration.
327328

0 commit comments

Comments
 (0)