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

MNT Adds dict typing hint to _parameter_constraints for mypy #24301

Merged
merged 4 commits into from
Aug 30, 2022

Conversation

thomasjpfan
Copy link
Member

This PR adds the dict typing hint to _parameter_constraints, which means we do not need to write # type: ignore anymore.

If we only want to avoid the # type: ignores we have right now, then not every _parameter_constraints requires dict. I added them all in this PR because it is more consistent and makes it easier for contributors.

@thomasjpfan thomasjpfan added the Quick Review For PRs that are quick to review label Aug 29, 2022
@thomasjpfan thomasjpfan changed the title MNT Adds dict type to _parameter_constraints for mypy MNT Adds dict typing hint to _parameter_constraints for mypy Aug 29, 2022
@thomasjpfan thomasjpfan removed the Quick Review For PRs that are quick to review label Aug 29, 2022
@stefmolin
Copy link
Contributor

@thomasjpfan - I think it would be a good idea to update the example code for the declaration in this issue for contributors going forward:

Screen Shot 2022-08-29 at 7 55 08 PM

Copy link
Member

@jjerphan jjerphan left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you, @thomasjpfan.

Thank you for your remark, @stefmolin. I think we can modify the issue description then this PR is merged.

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

Thanks @thomasjpfan. It's indeed more convenient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants