We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently code with variances is not handled during the stubs generation. If possible, this feature should be added.
In Python variance is inferred, therefor, if possible with Mypy, it should be inferred and added to the stubs generator.
The text was updated successfully, but these errors were encountered:
@lars-reimann With issue #36 we are able to create stubs like these:
# Python Code _T_co = TypeVar("_T_co", covariant=True, bound=str) _T_con = TypeVar("_T_con", contravariant=True, bound=int) class ClassA(Generic[_T_co, _T_con]): ...
// Safe-DS stubs class ClassA<out TCo, in TCon> where { TCo sub String, TCon super Int }
Therefore, this Issue is also already finished, right? Or am I mixing variance and constrains up?
Sorry, something went wrong.
Issue #35 & #36 added variance parsing api_analyzer; added variance a…
69d421f
…nd constraints to stubs generator
You can naturally handle constraints and variance in one PR, but they are different concepts:
Variance:
covariance=True
out
contravariance=True
in
Bounds/constraints:
bound=...
where
Since I handled both concepts already in issue #36 I will close this issue.
Masara
No branches or pull requests
Is your feature request related to a problem?
Currently code with variances is not handled during the stubs generation. If possible, this feature should be added.
Desired solution
In Python variance is inferred, therefor, if possible with Mypy, it should be inferred and added to the stubs generator.
Additional Context (optional)
The text was updated successfully, but these errors were encountered: