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

Type Loader parameter in PyYAML/yaml #9752

Merged
merged 3 commits into from
Feb 19, 2023
Merged

Conversation

Avasam
Copy link
Sponsor Collaborator

@Avasam Avasam commented Feb 18, 2023

Fixes an unknown parameter issue at https://github.com/python/typeshed/blob/main/tests/check_consistent.py#L146

I didn't feel it necessary, but I could make the parameters more flexible by making protocols of Reader & Parser & Scanner, Reader & Parser, Reader & Parser & Composer, Reader & Parser & BaseConstructor, ...
Plus you'd need to add type: ignore[misc] # pyright: ignore to all of 'em because of mixing Protocol and non-Protocol superclasses.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one nit :)

stubs/PyYAML/yaml/__init__.pyi Outdated Show resolved Hide resolved
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@AlexWaygood AlexWaygood merged commit d92332d into python:main Feb 19, 2023
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

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.

2 participants