Uh oh!
There was an error while loading. Please reload this page.
inspect: getmodulename takes a PathLike - #10329
Conversation
| def getmembers_static(object: object, predicate: _GetMembersPredicate | None = None) -> _GetMembersReturn: ... | ||
| def getmodulename(path: str) -> str | None: ... | ||
| def getmodulename(path: PathLike[str]) -> str | None: ... |
There was a problem hiding this comment.
It also accepts str. We should use _typeshed.StrPath
| defgetmodulename(path: PathLike[str]) ->str|None: ... | |
| defgetmodulename(path: StrPath) ->str|None: ... |
There was a problem hiding this comment.
Oh oof, thanks for the review!
This comment has been minimized.
This comment has been minimized.
jaraco
commented
Jun 18, 2023
There's code this will affect that's expected to land in |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
AlexWaygood
commented
Jun 18, 2023
It's okay, we agree that |
hauntsaninja
commented
Jun 18, 2023
Thanks, I'll add importlib_metadata to the primer corpus! I was just a little sad my initial mistake wasn't flagged |
jaraco
commented
Jun 18, 2023
Good point. Does that mean that there are no uses in the primer of |
jaraco
commented
Jun 18, 2023
Big thanks for the quick turnaround! |
Fixes#10328