-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Use "all +=" instead of duplicating the branches #7865
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
Conversation
There have been a few warnings already when testing locally. Let's see what CI says. |
I did some manual testing of this a while back -- I believe mypy also does not support this in a stub file, even though the CI is green. IIRC, it doesn't recognise any objects from |
This comment has been minimized.
This comment has been minimized.
I added a test case that passes, but that may be because of the special casing of |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
Right, I misremembered. I think I was trying to do something more ambitious in if sys.version_info >= (3, 7):
__all__ += runners.__all__ That's not supported by mypy IIRC. |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
If this works, it would allow us to reasonably define |
Looks like it also breaks pytype, though. |
I'm curious if pytype views |
PyCQA/flake8-pyi#219 for the flake8-pyi error |
@erictraut It seems that pyright doesn't accept the advanced |
This comment has been minimized.
This comment has been minimized.
@srittau, the I've filed this issue. Should be easy to fix. I'll probably publish the next version of pyright on Fri or Sat at the latest. If you can wait until then, great. If you want to move forward with this PR in the meantime, you could temporarily disable the |
Thanks! We are not in a rush with this PR and there are a few more problems that we need to take a look at. |
Hotfix release for #219, unblocking python/typeshed#7865
Also Cc @rchen152: Is |
This comment has been minimized.
This comment has been minimized.
I'll open a pytype issue for it. (I'm about to head out of town for two weeks, so I'll look into this when I get back if none of the other devs have resolved it in the meantime.) |
I've address the issue in pyright. The fix will be included in version 1.1.248, which I will publish within the next 48 hours. |
I've published pyright 1.1.248, which includes this fix. |
Required for python#7865
Pyright tests are now passing — thanks, as always, for the extremely quick fix! |
This comment has been minimized.
This comment has been minimized.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Thanks everyone for the support! |
Also, order the items alphabetically.