mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-15 16:27:09 +08:00
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:
@@ -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 = ...
|
||||
|
||||
Reference in New Issue
Block a user