Skip to content

Commit

Permalink
Fix OutputWrapper.style_func type (#1080)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
andersk authored Jul 30, 2022
1 parent 0e9ebf8 commit 41804f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django-stubs/core/management/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ...
Expand Down

0 comments on commit 41804f0

Please sign in to comment.