-
Notifications
You must be signed in to change notification settings - Fork 103
Closed as not planned
Labels
kind/bugindicates a bug in the projectindicates a bug in the project
Description
Description
Application.Get().charm is an str
However, the generated facade code accepts None|str|bytes:
python-libjuju/juju/client/_definitions.py
Lines 1967 to 1968 in a58645e
| if charm_ is not None and not isinstance(charm_, (bytes, str)): | |
| raise Exception(f"Expected charm_ to be a str, received: {type(charm_)}") |
The type checker rightfully infers None|str|bytes for the .charm attribute.
Urgency
Casually reporting
Python-libjuju version
3.6.1.0
Juju version
any
Reproduce / Test
charm_name: str = (await Application.Get()).charmMetadata
Metadata
Assignees
Labels
kind/bugindicates a bug in the projectindicates a bug in the project