-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated facade code types are too wide #1249
Comments
P.S. I imagine that the codegen path is generic and may be used for other things that are:
Thus it may not be a trivial change. |
Likewise, things are expected to be arrays of objects are also allowed to be:
For example: python-libjuju/juju/client/_definitions.py Lines 2132 to 2144 in a58645e
Schema: P.S. would this actually be valid for arguments (and not results), is it OK to pass formatted JSON as str or bytes? The same code appears to generate this for results as well: Code: python-libjuju/juju/client/_definitions.py Lines 3989 to 3998 in a58645e
Here, the extra types don't make sense. |
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 anstr
However, 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|bytes
for the.charm
attribute.Urgency
Casually reporting
Python-libjuju version
3.6.1.0
Juju version
any
Reproduce / Test
The text was updated successfully, but these errors were encountered: