-
-
Notifications
You must be signed in to change notification settings - Fork 358
Closed
Description
Jedi:
> import jedi
> script = jedi.Script("import trio; trio.Path.")
> comp = script.complete()
> [cc.name for cc in comp if not cc.name.startswith('_')]
Out: ['mro', 'open']
mypy also doesn't see them, which is probably the bigger problem
$ mypy trio/tests/test_path.py
...
trio/tests/test_path.py:189: error: "Type[Path]" has no attribute "joinpath" [attr-defined]
which means downstream users will get typing errors if they use trio.Path
in their code.
I haven't figured out how to check pylint, but otherwise it should be doable to modify test_static_tool_sees_all_symbols
to also check class members.
For trio.Path
, there's presumably some reason it's doing lots of magic instead of inheriting from Path
- so if that's not on the table one would either have to define all the methods, or if that's what _forward_magic
is for it's maybe possible to list them there, or some other constant.
Metadata
Metadata
Assignees
Labels
No labels