diff --git a/stdlib/@python2/typing.pyi b/stdlib/@python2/typing.pyi index bf480ac3e..e27220492 100644 --- a/stdlib/@python2/typing.pyi +++ b/stdlib/@python2/typing.pyi @@ -37,7 +37,7 @@ _F = TypeVar("_F", bound=Callable[..., Any]) def final(f: _F) -> _F: ... def overload(f: _F) -> _F: ... -Literal: _SpecialForm +Literal: _SpecialForm = ... # TypedDict is a (non-subscriptable) special form. TypedDict: object @@ -304,7 +304,7 @@ class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]): Text = unicode -TYPE_CHECKING = True +TYPE_CHECKING: Literal[True] class IO(Iterator[AnyStr], Generic[AnyStr]): # TODO detach diff --git a/stdlib/typing.pyi b/stdlib/typing.pyi index c46efeccf..483edf146 100644 --- a/stdlib/typing.pyi +++ b/stdlib/typing.pyi @@ -502,7 +502,7 @@ class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]): Text = str -TYPE_CHECKING = True +TYPE_CHECKING: _Literal[True] # In stubs, the arguments of the IO class are marked as positional-only. # This differs from runtime, but better reflects the fact that in reality diff --git a/stubs/python-gflags/gflags.pyi b/stubs/python-gflags/gflags.pyi index 9f651a093..ae2944297 100644 --- a/stubs/python-gflags/gflags.pyi +++ b/stubs/python-gflags/gflags.pyi @@ -100,11 +100,11 @@ class Flag: value: Any help: str short_name: str - boolean = False - present = False + boolean: bool + present: bool parser: ArgumentParser serializer: ArgumentSerializer - allow_override = False + allow_override: bool def __init__( self, parser: ArgumentParser,