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

NewType requires a second argument #4374

Closed
not-my-profile opened this issue Dec 26, 2022 · 2 comments
Closed

NewType requires a second argument #4374

not-my-profile opened this issue Dec 26, 2022 · 2 comments
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working

Comments

@not-my-profile
Copy link
Contributor

Pyright doesn't complain about the following code:

T = NewType('T')

despite it leading to a runtime TypeError:

TypeError: NewType() missing 1 required positional argument: 'tp'

@erictraut
Copy link
Collaborator

This will be addressed in the next release.

@erictraut erictraut added bug Something isn't working addressed in next version Issue is fixed and will appear in next published version labels Dec 26, 2022
@erictraut
Copy link
Collaborator

This is included in pyright 1.1.286, which I just published. It will also be included in a future version of pylance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants