From 0878173943c829ccf104d81d29f178d66f0f0d2c Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 20 Feb 2023 18:39:48 +0000 Subject: [PATCH] `textwrap.{wrap, fill}`: `max_lines` defaults to `None` (#9775) All keyword arguments are delegated to `TextWrapper.__init__`: https://github.com/python/cpython/blob/59e86caca812fc993c5eb7dc8ccd1508ffccba86/Lib/textwrap.py#L373-L396 --- stdlib/textwrap.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/textwrap.pyi b/stdlib/textwrap.pyi index e4a5b7899..578138b84 100644 --- a/stdlib/textwrap.pyi +++ b/stdlib/textwrap.pyi @@ -64,7 +64,7 @@ def wrap( break_long_words: bool = ..., break_on_hyphens: bool = ..., drop_whitespace: bool = ..., - max_lines: int = ..., + max_lines: int | None = None, placeholder: str = ..., ) -> list[str]: ... def fill( @@ -80,7 +80,7 @@ def fill( break_long_words: bool = ..., break_on_hyphens: bool = ..., drop_whitespace: bool = ..., - max_lines: int = ..., + max_lines: int | None = None, placeholder: str = ..., ) -> str: ... def shorten(