Skip to content
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

Made pkg_resoursces.NullProvider's has_metadata and metadata_isdir methods return actual booleans like all other Providers #4254

Merged
merged 2 commits into from Mar 5, 2024

Conversation

Avasam
Copy link
Contributor

@Avasam Avasam commented Mar 4, 2024

Summary of changes

Made pkg_resoursces.NullProvider's has_metadata and metadata_isdir methods return actual booleans like all other Providers.
This was noticed when attempting to type the pkg_resources package for #2345

xref python/typeshed#11512 (comment)

# Note: runtime forgets to coerce the return type to boolean,
# but we need to specify bool for NullProvider to respect the IResourceProvider protocol

Pull Request Checklist

…ir` methods return actual booleans like all other Providers
@Avasam Avasam force-pushed the boolean-has_metadata-&-metadata_isdir branch from 752fe1d to 56bd481 Compare March 4, 2024 01:05
Avasam added a commit to Avasam/typeshed that referenced this pull request Mar 4, 2024
@abravalheri abravalheri merged commit b4b622e into pypa:main Mar 5, 2024
23 checks passed
@abravalheri
Copy link
Contributor

Thank you very much @Avasam.

Avasam added a commit to Avasam/typeshed that referenced this pull request Mar 5, 2024
@Avasam Avasam deleted the boolean-has_metadata-&-metadata_isdir branch March 5, 2024 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants