assert(Not)AlmostEqual(s) specifies the type as float or datetime.datetime, when in practice it works also with other types that support subtraction, absolute value, rounding and comparison with zero, such as Fraction or Decimal.
This should be fixed (using TypeVar and a Protocol) to prevent Mypy errors in tests that use these types.
assert(Not)AlmostEqual(s)specifies the type asfloatordatetime.datetime, when in practice it works also with other types that support subtraction, absolute value, rounding and comparison with zero, such asFractionorDecimal.This should be fixed (using
TypeVarand aProtocol) to prevent Mypy errors in tests that use these types.