From 438f8b5829133830b38bb1b71c4441c9135b206d Mon Sep 17 00:00:00 2001 From: Tatsh Date: Mon, 27 Jan 2020 17:34:13 -0500 Subject: [PATCH] Add OutputWrapper write() signature (#301) * Add OutputWrapper write() signature * Add #type: ignore[override] to OutputWrapper write() signature --- django-stubs/core/management/base.pyi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/django-stubs/core/management/base.pyi b/django-stubs/core/management/base.pyi index 92acfbf..ec5896f 100644 --- a/django-stubs/core/management/base.pyi +++ b/django-stubs/core/management/base.pyi @@ -23,13 +23,16 @@ class OutputWrapper(TextIOBase): @property def style_func(self): ... @style_func.setter - def style_func(self, style_func: Any): ... + def style_func(self, style_func: Callable[[str], str]): ... ending: str = ... def __init__( - self, out: Union[StringIO, TextIOWrapper], style_func: Optional[Callable] = ..., ending: str = ... + self, out: Union[StringIO, TextIOWrapper], style_func: Optional[Callable[[str], str]] = ..., ending: str = ... ) -> None: ... def __getattr__(self, name: str) -> Callable: ... def isatty(self) -> bool: ... + def write( # type: ignore[override] + self, msg: str, style_func: Optional[Callable[[str], str]] = ..., ending: Optional[str] = ... + ) -> None: ... class BaseCommand: help: str = ...