Skip to content

Commit 4b6b1ce

Browse files
committed
chore: type alias for readability
1 parent a399af9 commit 4b6b1ce

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

juju/client/connection.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import macaroonbakery.httpbakery as httpbakery
1717
import websockets
1818
from dateutil.parser import parse
19-
from typing_extensions import Self, overload
19+
from typing_extensions import Self, TypeAlias, overload
2020

2121
from juju import errors, jasyncio, tag, utils
2222
from juju.client import client
@@ -26,6 +26,8 @@
2626
from .facade import _JSON, _RICH_JSON, TypeEncoder
2727
from .facade_versions import client_facade_versions, known_unsupported_facades
2828

29+
SPECIFIED_FACADES: TypeAlias = dict[str, dict[Literal["versions"], Sequence[int]]]
30+
2931
LEVELS = ["TRACE", "DEBUG", "INFO", "WARNING", "ERROR"]
3032
log = logging.getLogger("juju.client.connection")
3133

@@ -136,8 +138,7 @@ async def connect(
136138
max_frame_size: int | None = None,
137139
retries=3,
138140
retry_backoff=10,
139-
specified_facades: dict[str, dict[Literal["versions"], Sequence[int]]]
140-
| None = None,
141+
specified_facades: SPECIFIED_FACADES | None = None,
141142
proxy=None,
142143
debug_log_conn=None,
143144
debug_log_params={},

0 commit comments

Comments
 (0)