-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Here is a simple example:
from gi.repository import GLib
parser = GLib.option.OptionParser(option_list=[
GLib.option.make_option('--flag', action='store_true', help='flag'),
])
parser.parse_args()
print('flag is', parser.values.flag)mypy complains about type errors:
$ mypy repr.py
repr.py:3: error: "ellipsis" has no attribute "OptionParser" [attr-defined]
repr.py:4: error: "ellipsis" has no attribute "make_option" [attr-defined]
Found 2 errors in 1 file (checked 1 source file)
It looks like the placeholder for this attribute is currently a literal ellipsis:
| option = ... # FIXME Constant |
I believe stubgen annotates attributes with _typeshed.Incomplete when the type cannot be determined. typing.Any would probably work as well.
Metadata
Metadata
Assignees
Labels
No labels