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

"Strict disambiguation" stubs #192

Open
ariebovenberg opened this issue Dec 22, 2024 · 2 comments
Open

"Strict disambiguation" stubs #192

ariebovenberg opened this issue Dec 22, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@ariebovenberg
Copy link
Owner

With #173 , the disambiguate parameter was made optional. For those that want the "stricter" behavior, it might be possible to publish optional stubs that make the parater required. This wouldn't change the actual runtime behavior, but would allow IDEs and typecheckers to enforce the disambiguation parameter.

@ariebovenberg ariebovenberg added the enhancement New feature or request label Dec 22, 2024
@spacemanspiff2007
Copy link

How about an additional option to monkey patch it so it raises an Error like the option to set the time for testing?

from whenever import strict_disambiguation

with strict_disambiguation():
    ....

@ariebovenberg
Copy link
Owner Author

Another option is to raise warnings, which can then be ignored by default, but can be turned into errors with the standard warning filter mechanism

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants