Using this code:
from matplotlib.dates import DateFormatter
date_fmt = "%H:%M:%S"
date_formatter = DateFormatter(date_fmt)
Running Mypy in strict mode results in an erorr:
$ mypy --strict main.py
main.py:4: error: Call to untyped function "DateFormatter" in typed context [no-untyped-call]
Found 1 error in 1 file (checked 1 source file)
We run Mypy in strict mode across all of our code base to catch programming errors and would like to use it with matplotlib without the need to suppress errors like this.
Environment
- Python 3.11.11
- matplotlib 3.10.1
- mypy 1.15.0
Related References
Using this code:
Running Mypy in
strictmode results in an erorr:We run Mypy in
strictmode across all of our code base to catch programming errors and would like to use it with matplotlib without the need to suppress errors like this.Environment
Related References