-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Tweak stubs for better VS Code import #1234
Conversation
for more information, see https://pre-commit.ci
After this release goes out, let's move the others too ( |
Are you positive the new syntax doesn’t break something somewhere? I’ve got this vague memory of trying it myself and having to abort. We also kinda stopped running Mypy on 3.7. 🤔 |
My main work codebase is 3.8 and Mypy 1.8.0, no problems here. Best I can do :( Can you run it over your stuff? PEP 604 (new union syntax) is from 2019 so typecheckers have had some time to catch up.
Are we writing snippets for devs to scan through or novels for when you're on the toilet? 🤔 |
Thoughts and prayers!
I’m all 3.12. 😇
Right, we’re benefiting once again from our external typing stubs, aren’t we?
Yes! |
Yeah. We would also benefit if we were using |
There's a few cases where that doesn't work as well tho, because sometimes types aren't used just as annotations. Stuff like |
I moved the definitions of
define
,mutable
,frozen
andfield
toattrs
, and madeattr
import them.Then I modernized the stubs since I couldn't help myself. We can use modern typing stuff in stubs.
This was motivated by microsoft/pylance-release#5388.