Package: mypy Version: 1.0.1-1 Severity: normal X-Debbugs-Cc: dalg...@gmail.com
Dear Maintainer, $ cat u.py import argparse import glob parser = argparse.ArgumentParser() parser.add_argument('-g', type=glob.glob) $ mypy u.py u.py:5: error: Argument "type" to "add_argument" of "_ActionsContainer" has incompatible type "Callable[[AnyStr, DefaultNamedArg(Optional[Union[str, bytes, PathLike[str], PathLike[bytes]]], 'root_dir'), DefaultNamedArg(Optional[int], 'dir_fd'), DefaultNamedArg(bool, 'recursive'), DefaultNamedArg(bool, 'include_hidden')], List[AnyStr]]"; expected "Union[Callable[[str], List[AnyStr]], FileType]" [arg-type] Found 1 error in 1 file (checked 1 source file) Add the following directive to whatever line contains "type=glob.glob" is a work around: # type: ignore[arg-type] -- System Information: Debian Release: 12.4 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 6.1.0-17-amd64 (SMP w/6 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages mypy depends on: ii python3 3.11.2-1+b1 ii python3-mypy 1.0.1-1 Versions of packages mypy recommends: ii python3-typeshed 0.0~git20221107.4f381af-1 Versions of packages mypy suggests: pn mypy-doc <none> -- no debconf information