You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Units handling is a second portion which was omitted from the first round of type hinting.
While much of it should be relatively straightforward (at the very least formatters/locators/etc, as in this example) the units portions of the code have quite a bit of dynamic behavior that is not always possible to capture in a static typing context.
We can (and should) do better where we are able, but addressing units as a whole is a relatively large typing task.
Similar to #26941, the base class for Locators is type hinted, and so some level of benefit from type hints can be gained by using that, but it does not address the constructor call.
In general I think that --strict is often too strict especially when it comes to the no-untyped-call check
I would perhaps suggest adding a config for matplotlib to ignore this rule:
Bug summary
with mypy,
MinuteLocator
results in error:error: Call to untyped function "MinuteLocator" in typed context [no-untyped-call]
Code for reproduction
Actual outcome
error: Call to untyped function "MinuteLocator" in typed context [no-untyped-call]
Expected outcome
No Mypy error
Additional information
No response
Operating system
Ubuntu
Matplotlib Version
3.8.0
Matplotlib Backend
QTAgg
Python version
3.8.10
Jupyter version
No response
Installation
pip
The text was updated successfully, but these errors were encountered: