Open rcmdnk opened 1 year ago
by strict annotation check by mypy,
arg_parser_opts: dict = {"add_help": False, "allow_abbrev": False}
https://github.com/rcmdnk/homebrew-file/blob/789ed640ea690dc4819c6e231d2884bd0d16e530/src/brew_file/main.py#L23
must have type annotation in the dict, like dict[str, bool].
dict[str, bool]
But this leads to an error at func(**arg_parser_opts) like
func(**arg_parser_opts)
Argument 2 to "ArgumentParser" has incompatible type "**Dict[str, bool]"; expected "Optional[str]" [arg-type]
dict[str, Any] resolves this.
dict[str, Any]
This problem is currently being discussed at: https://github.com/python/mypy/issues/5382.
fixed at mypy 1.7 but need python 3.10 or later to use Unpack (and NotRequired)
by strict annotation check by mypy,
must have type annotation in the dict, like
dict[str, bool]
.But this leads to an error at
func(**arg_parser_opts)
likedict[str, Any]
resolves this.This problem is currently being discussed at: https://github.com/python/mypy/issues/5382.