TYP/DOC: fix flavor param with incorrect type hint in read_html (#55076) · pandas-dev/pandas@723feb9 (original) (raw)

Original file line number Diff line number Diff line change
@@ -1033,7 +1033,7 @@ def read_html(
1033 1033 io: FilePath | ReadBuffer[str],
1034 1034 *,
1035 1035 match: str | Pattern = ".+",
1036 -flavor: str | None = None,
1036 +flavor: str | Sequence[str] None = None,
1037 1037 header: int | Sequence[int] None = None,
1038 1038 index_col: int | Sequence[int] None = None,
1039 1039 skiprows: int | Sequence[int] slice None = None,
@@ -1074,11 +1074,11 @@ def read_html(
1074 1074 This value is converted to a regular expression so that there is
1075 1075 consistent behavior between Beautiful Soup and lxml.
1076 1076
1077 - flavor : str, optional
1078 - The parsing engine to use. 'bs4' and 'html5lib' are synonymous with
1079 - each other, they are both there for backwards compatibility. The
1080 - default of ``None`` tries to use ``lxml`` to parse and if that fails it
1081 - falls back on ``bs4`` + ``html5lib``.
1077 + flavor : str or list-like, optional
1078 + The parsing engine (or list of parsing engines) to use. 'bs4' and
1079 + 'html5lib' are synonymous with each other, they are both there for
1080 + backwards compatibility. The default of ``None`` tries to use ``lxml``
1081 + to parse and if that fails it falls back on ``bs4`` + ``html5lib``.
1082 1082
1083 1083 header : int or list-like, optional
1084 1084 The row (or list of rows for a :class:`~pandas.MultiIndex`) to use to