-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
inspect.getmodulename accepts pathlib.Path #10328
Comments
hauntsaninja
added a commit
to hauntsaninja/typeshed
that referenced
this issue
Jun 18, 2023
AlexWaygood
pushed a commit
that referenced
this issue
Jun 18, 2023
jaraco
added a commit
to python/importlib_metadata
that referenced
this issue
Aug 20, 2024
clrpackages
pushed a commit
to clearlinux-pkgs/pypi-importlib_metadata
that referenced
this issue
Aug 22, 2024
…3.0 to version 8.4.0 Daniel Hollas (2): Defer import inspect Don't use global var Jason R. Coombs (5): Restore single-expression logic. Use third-person imperative voice and link to issue in comment. Remove workaround for python/typeshed#10328. Add news fragment. Finalize
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider this simple snippet:
Run it with Python 3.8 or later and it runs fine (I don't have Python 3.7 due to ARM).
Check it with mypy and it fails:
Indeed the definition indicates that only
str
is allowed for input.The implementation passes the input through to
os.path.basename
, which acceptspathlib.Path
. Probably the typeshed should reflect this behavior, especially considering that the docs suggest that the input is a "path".The text was updated successfully, but these errors were encountered: