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

dirty-equals causes a infinite-loop if it is used with functools.singledispatch #104

Closed
15r10nk opened this issue Sep 13, 2024 · 0 comments

Comments

@15r10nk
Copy link
Collaborator

15r10nk commented Sep 13, 2024

The following code causes a infinite-loop inside functools.singledispatch

from dirty_equals import IsStr

from functools import singledispatch


@singledispatch
def dispatch(a):
    print("generic", a)


s = IsStr()
dispatch(s)

It looks like this is caused by the fact that IsStr == IsStr is False.

I already created a pull-request, please let me know if this can be fixed this way.

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

No branches or pull requests

2 participants