Skip to content

MNT Add flexibe_types to assert_docstring_consistency #30943

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

Closed
wants to merge 1 commit into from

Conversation

lucyleeow
Copy link
Member

@lucyleeow lucyleeow commented Mar 4, 2025

Reference Issues/PRs

Follows from #28678 (comment)

What does this implement/fix? Explain your changes.

Adds flexibe_types:

  • dictionary allowing you to specify flexible types for individual param/attr/return
  • allows you to specify the number of types that should be common between objects
  • also remove default type checking, if you wish to only use this set int to 0

Added a very simple test case just to demonstrate its use, but no unit tests.

Any other comments?

The addition is probably more complicated than I would like, both the parameter use and the code. I do think it does address most (all?) of the type cases we would encounter though.

Not 100% and open to suggestions. Potentially a simple ignore_type option may be easier?

Note this is a draft PR, as it is just to see if we like the addition.

cc @glemaitre @adrinjalali @StefanieSenger

@lucyleeow lucyleeow marked this pull request as draft March 4, 2025 23:36
Copy link

github-actions bot commented Mar 4, 2025

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 4f97207. Link to the linter CI: here

@lucyleeow
Copy link
Member Author

closing in favour of #30944

@lucyleeow lucyleeow closed this Mar 19, 2025
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.

1 participant