-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed as not planned
Closed as not planned
Copy link
Description
Given python 3.11
❯ python --version
Python 3.11.14
Given mypy 0.991.
❯ mypy --version
mypy 0.991 (compiled: yes)
Given types-setuptools in latest version 80.9.0.20251223.
❯ pip show types-setuptools
Name: types-setuptools
Version: 80.9.0.20251223
Given a setup.py specifying package_data with a dictionary value: https://github.com/wazo-platform/wazo-calld/blob/b21ab4d2ad61b8eab6f64efcf373071259cc27fc/setup.py#L15-L17 .
setup(
...
package_data={
'wazo_calld.plugins': ['*/api.yml'],
},mypy finds an error:
$ mypy --exclude='build' --exclude='integration_tests' .
setup.py:15: error: Argument "package_data" to "setup" has incompatible type "Dict[str, List[str]]"; expected "_DictLike[str, List[str]]" [arg-type]
setup.py:15: note: Following member(s) of "Dict[str, List[str]]" have conflicts:
setup.py:15: note: Expected:
setup.py:15: note: def get(self, str, Optional[Any] = ..., /) -> Optional[List[str]]
setup.py:15: note: Got:
setup.py:15: note: @overload
setup.py:15: note: def get(self, str, /) -> Optional[List[str]]
setup.py:15: note: @overload
setup.py:15: note: def [_T] get(self, str, Union[List[str], _T], /) -> Union[List[str], _T]
Found 1 error in 1 file (checked 206 source files)This can be reproduced in a fresh virtual environment, see attached archive for minimal reproduction scenario.
MarcWazo and homatthew
Metadata
Metadata
Assignees
Labels
No labels