Description
According to
https://github.com/dimaqq/juju-schema-analysis/blob/0acd07573bb2c192785796381f0594470ef296d8/schemas-juju-3.6.0.model-user.txt#L741C1-L753C12
Application.Get().charm is an str
However, the generated facade code accepts None|str|bytes:
|
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()).charm
Description
According to
https://github.com/dimaqq/juju-schema-analysis/blob/0acd07573bb2c192785796381f0594470ef296d8/schemas-juju-3.6.0.model-user.txt#L741C1-L753C12
Application.Get().charmis anstrHowever, the generated facade code accepts
None|str|bytes:python-libjuju/juju/client/_definitions.py
Lines 1967 to 1968 in a58645e
The type checker rightfully infers
None|str|bytesfor the.charmattribute.Urgency
Casually reporting
Python-libjuju version
3.6.1.0
Juju version
any
Reproduce / Test