control: fixed -1 1.6.0-1 On Sat, 10 Feb 2024 21:17:39 -0800 Mike Castle <dalg...@gmail.com> wrote: > 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]
Thank you for your report. This was fixed in mypy 1.6.0; I recommend using your workaround in the mean time.
-- Michael R. Crusoe
OpenPGP_signature.asc
Description: OpenPGP digital signature