| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Thanks, this should be a list. Also, under what circumstances is this ever None?
Actually looking closer, sometimes this can be at least a _NamespacePath (which is a MutableSequence).
Sorry, something went wrong.
Yeah arguable. In the other PR they were discussing about this because it may not exist at all which cannot be expressed. Or can it?
Oh ok. Like option to list[str] | MutableSequence? |
Sorry, something went wrong.
|
Thanks for reviewing! 🙏 |
Sorry, something went wrong.
|
We don't have a way to express "__path__ may be missing", but I don't think it's a problem in practice:
|
Sorry, something went wrong.
`ModuleType.__path__` to be `MutableSequences[str]` covering `list` and `_NamespacePath` Co-authored-by: Akuli <akuviljanen17@gmail.com>
|
Diff from mypy_primer, showing the effect of this PR on open source code: core (https://github.com/home-assistant/core.git)
+ homeassistant/loader.py:298: error: unused "type: ignore" comment
edgedb (https://github.com/edgedb/edgedb.git)
+ edb/schema/std.py:41: error: unused "type: ignore" comment
+ edb/schema/std.py:42: error: unused "type: ignore" comment
+ edb/schema/std.py:43: error: unused "type: ignore" comment
+ edb/schema/std.py:44: error: unused "type: ignore" comment
|
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
|
a pleasure 🙇♀️ |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Hello typeshed crew!
Analog to #6186 I'd like to add __path__ to ModuleType.
Custom packages always have this attribute and currently getting __path__ from these via sys.modules like for instance:
results in typing complaints like
Since __file__ is already implemented. __path__ would also be good. Thanks.
ëRiC