Fix OutputWrapper.style_func type (#1080)

style_func has a setter that converts None to lambda x: x, so the
getter cannot return None.

https://github.com/django/django/blob/4.0.6/django/core/management/base.py#L141-L150

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2022-07-30 02:58:41 -07:00
committed by GitHub
parent 0e9ebf838b
commit 41804f0e8d

View File

@@ -39,7 +39,7 @@ class DjangoHelpFormatter(HelpFormatter):
class OutputWrapper(TextIOBase):
@property
def style_func(self) -> Optional[Callable[[str], str]]: ...
def style_func(self) -> Callable[[str], str]: ...
@style_func.setter
def style_func(self, style_func: Optional[Callable[[str], str]]) -> None: ...
ending: str = ...