Compare with uninitialised types
mainIn most cases, dirty-equals allows you to compare an object directly against a type class without calling it (i.e., without adding ()). This is a convenience to reduce boilerplate.
Warning: This does not work with PyPy.
Limitation: Types that require at least one argument during initialisation (such as IsApprox) cannot be used without parentheses. Comparing against an uninitialised type that requires arguments will simply return False.
from dirty_equals import IsInt
# These are equivalent
assert 1 == IsInt
assert 1 == IsInt()