chore: Python 3.12 is the floor (NAPALM/driver-standard#6)
driver / standard (pull_request) Successful in 21s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m3s
driver / test (3.12) (pull_request) Successful in 1m2s
driver / lowest (pull_request) Failing after 30s
driver / test (3.13) (pull_request) Successful in 1m0s
driver / build (pull_request) Successful in 31s
driver / security (pull_request) Successful in 1m13s
CI / driver (pull_request) Failing after 2m50s
driver / publish (pull_request) Skipped
driver / standard (pull_request) Successful in 21s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m3s
driver / test (3.12) (pull_request) Successful in 1m2s
driver / lowest (pull_request) Failing after 30s
driver / test (3.13) (pull_request) Successful in 1m0s
driver / build (pull_request) Successful in 31s
driver / security (pull_request) Successful in 1m13s
CI / driver (pull_request) Failing after 2m50s
driver / publish (pull_request) Skipped
netOrk runs every driver in its own containers on Python 3.12, so 3.10 and 3.11 are no longer supported or tested. requires-python, mypy and ruff move to 3.12, along with what ruff's pyupgrade rules then rewrite.
This commit is contained in:
1 parent
e400c4359c
commit
fbd3cf0129
6 files changed
+15
-15
No files matched your search
@@ -8,12 +8,9 @@ name a single entry, and guessing would overwrite one the caller never meant.
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable, Iterable
|
||||
from typing import TypeVar
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
|
||||
def index_live(entries: Iterable[T], key: Callable[[T], str]) -> tuple[dict[str, T], set[str]]:
|
||||
def index_live[T](entries: Iterable[T], key: Callable[[T], str]) -> tuple[dict[str, T], set[str]]:
|
||||
"""Live entries by key, and the keys more than one of them holds.
|
||||
|
||||
Entries without a key are left out: they are not the caller's to match.
|
||||
@@ -32,7 +29,9 @@ def index_live(entries: Iterable[T], key: Callable[[T], str]) -> tuple[dict[str,
|
||||
return by_key, shared
|
||||
|
||||
|
||||
def check_desired(entries: list[T], key: Callable[[T], str], shared: set[str], what: str) -> None:
|
||||
def check_desired[T](
|
||||
entries: list[T], key: Callable[[T], str], shared: set[str], what: str
|
||||
) -> None:
|
||||
"""``ValueError`` for a desired entry with no key, a key given twice, or a
|
||||
key that names more than one live entry."""
|
||||
seen: set[str] = set()
|
||||
|
||||
@@ -5,9 +5,9 @@ These supplement the types defined in napalm.base.models and are used by the
|
||||
abstract device-type driver classes in this package.
|
||||
"""
|
||||
|
||||
from typing import Literal, get_args
|
||||
from typing import Literal, NotRequired, get_args
|
||||
|
||||
from typing_extensions import NotRequired, TypedDict
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Common (shared across device types)
|
||||
|
||||
Reference in new issue
Block a user