Skip to content
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

[BUG] type annotations for optional parameters #133

Open
alexdrydew opened this issue Nov 14, 2022 · 0 comments
Open

[BUG] type annotations for optional parameters #133

alexdrydew opened this issue Nov 14, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@alexdrydew
Copy link
Contributor

alexdrydew commented Nov 14, 2022

Observed behavior

Type annotations of optional parameters are not propagated to __init__ methods of the attrs generated classes, which leads to incrorect stubs and failing mypy.

Expected behavior

Every Optional[...] or Union[..., None] parameter should have a correct annotation in the __init__ method

Python Version

3.9

Toloka-Kit Version

1.0.2

Other Packages Versions

No response

Example code

status: typing.Union[str, toloka.client.assignment.Assignment.Status, typing.List[typing.Union[str, toloka.client.assignment.Assignment.Status]]] = None,

Relevant log output

No response

@alexdrydew alexdrydew added the bug Something isn't working label Nov 14, 2022
@alexdrydew alexdrydew changed the title [BUG] type annotations for optional paramters [BUG] type annotations for optional parameters Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant