Closed zhihaoy closed 4 years ago
Are you referring to error: Name 'func' already defined
? That can be disabled in mypy configuration: # type: ignore[no-redef]
. Alternatively, the register
method can also be used:
@amethod.register
def _(...):
Are you referring to
error: Name 'func' already defined
? That can be disabled in mypy configuration:# type: ignore[no-redef]
.
I mean doesn't work. Where are the stubs files for this project?
If you have any solution, we should document it.
Stub files aren't necessary since the project already has type hints. c52967c added the py.typed
file so that mypy
would recognize it.
For the already defined
error, there isn't much that can be done. The README mentions it now, and #12 is opened to consider encouraging using register
as the preferred style.
You may need to type annotate the package itself. Or to make it work with
@overload
in some way.