127 added the py.typed file to the package to make this a PEP 561 compliant package. This triggers mypy to look into this package and search for type annotations.
The problem is that the entire package was not update to have type hints, so a user that happens to use other methods other than were changed in #127 now gets mypy errors.
Consider:
from drf_writable_nested.serializers import WritableNestedModelSerializer
class MySerializer(WritableNestedModelSerializer):
pass
a = MySerializer().save()
$ mypy --strict main.py
main.py:8: error: Call to untyped function "save" in typed context
Found 1 error in 1 file (checked 1 source file)
127 added the
py.typed
file to the package to make this a PEP 561 compliant package. This triggersmypy
to look into this package and search for type annotations.The problem is that the entire package was not update to have type hints, so a user that happens to use other methods other than were changed in #127 now gets
mypy
errors.Consider:
Because this method was not annotated:
https://github.com/beda-software/drf-writable-nested/blob/c6c47e448d25458081f94e387235c51b8f9b9097/drf_writable_nested/mixins.py#L229-L230