Closed
Description
Bug Report
mypy-nonfloat-decimal no longer works on 128661c. Mentioned on #12807 (comment), but was told to open an issue. :) I also have an internal plugin using get_dynamic_class_hook()
that is no longer working, but that's probably a separate issue and harder to breakdown.
To Reproduce
(Write your steps here:)
pip install mypy-nonfloat-decimal https://github.com/python/mypy/archive/128661ccbf4396ed1538421c481f1773c7490169.zip#egg=mypy
t.py
:
from decimal import Decimal
Decimal(1.2)
mypy.ini
:
[mypy]
plugins = mypy_nonfloat_decimal
mypy t.py
Expected Behavior
t.py:3: error: Invalid type passed to Decimal (expected "Union[int, str, Decimal]"), got builtins.float instead (offender: float)
Found 1 error in 1 file (checked 1 source file)
Actual Behavior
Success: no issues found in 1 source file
Your Environment
- Mypy version used: 128661c
- Mypy command-line flags:
- Mypy configuration options from
mypy.ini
(and other config files): - Python version used: 3.10.4
- Operating system and version: macOS 12.3.1