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

Misleading return type when using merge_init_into_class #85

Closed
monosans opened this issue Jul 10, 2023 · 1 comment
Closed

Misleading return type when using merge_init_into_class #85

monosans opened this issue Jul 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@monosans
Copy link

Currently, when merge_init_into_class and show_signature_annotations are enabled, the class signature looks like None is returned when the class is called, which looks strange and misleading:

SomeClass() -> None 

The simplest solution seems to be hiding the return type for classes. The ideal solution is to take the return type from __new__.

@pawamoy
Copy link
Member

pawamoy commented Jul 11, 2023

I didn't even notice that, thanks. I agree that we could simply remove the return type.

@pawamoy pawamoy added the bug Something isn't working label Jul 13, 2023
@pawamoy pawamoy closed this as completed Jul 13, 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

2 participants