Skip to content

Commit

Permalink
Bump docutils to 0.21.* (#11805)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored Apr 22, 2024
1 parent 1a86b3b commit ae5c45b
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 16 deletions.
2 changes: 1 addition & 1 deletion stubs/docutils/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.20.*"
version = "0.21.*"
upstream_repository = "https://sourceforge.net/p/docutils/code"
partial_stub = true

Expand Down
66 changes: 55 additions & 11 deletions stubs/docutils/docutils/frontend.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,84 @@ __docformat__: str
def store_multiple(option, opt, value, parser, *args, **kwargs) -> None: ...
def read_config_file(option, opt, value, parser) -> None: ...
def validate_encoding(
setting, value, option_parser, config_parser: Incomplete | None = None, config_section: Incomplete | None = None
setting,
value: Incomplete | None = None,
option_parser: Incomplete | None = None,
config_parser: Incomplete | None = None,
config_section: Incomplete | None = None,
): ...
def validate_encoding_error_handler(
setting, value, option_parser, config_parser: Incomplete | None = None, config_section: Incomplete | None = None
setting,
value: Incomplete | None = None,
option_parser: Incomplete | None = None,
config_parser: Incomplete | None = None,
config_section: Incomplete | None = None,
): ...
def validate_encoding_and_error_handler(
setting, value, option_parser, config_parser: Incomplete | None = None, config_section: Incomplete | None = None
): ...
def validate_boolean(
setting, value, option_parser, config_parser: Incomplete | None = None, config_section: Incomplete | None = None
setting,
value: Incomplete | None = None,
option_parser: Incomplete | None = None,
config_parser: Incomplete | None = None,
config_section: Incomplete | None = None,
) -> bool: ...
def validate_nonnegative_int(
setting, value, option_parser, config_parser: Incomplete | None = None, config_section: Incomplete | None = None
setting,
value: Incomplete | None = None,
option_parser: Incomplete | None = None,
config_parser: Incomplete | None = None,
config_section: Incomplete | None = None,
) -> int: ...
def validate_threshold(
setting, value, option_parser, config_parser: Incomplete | None = None, config_section: Incomplete | None = None
setting,
value: Incomplete | None = None,
option_parser: Incomplete | None = None,
config_parser: Incomplete | None = None,
config_section: Incomplete | None = None,
) -> int: ...
def validate_colon_separated_string_list(
setting, value, option_parser, config_parser: Incomplete | None = None, config_section: Incomplete | None = None
setting,
value: Incomplete | None = None,
option_parser: Incomplete | None = None,
config_parser: Incomplete | None = None,
config_section: Incomplete | None = None,
) -> list[str]: ...
def validate_comma_separated_list(
setting, value, option_parser, config_parser: Incomplete | None = None, config_section: Incomplete | None = None
setting,
value: Incomplete | None = None,
option_parser: Incomplete | None = None,
config_parser: Incomplete | None = None,
config_section: Incomplete | None = None,
) -> list[str]: ...
def validate_url_trailing_slash(
setting, value, option_parser, config_parser: Incomplete | None = None, config_section: Incomplete | None = None
setting,
value: Incomplete | None = None,
option_parser: Incomplete | None = None,
config_parser: Incomplete | None = None,
config_section: Incomplete | None = None,
) -> str: ...
def validate_dependency_file(
setting, value, option_parser, config_parser: Incomplete | None = None, config_section: Incomplete | None = None
setting,
value: Incomplete | None = None,
option_parser: Incomplete | None = None,
config_parser: Incomplete | None = None,
config_section: Incomplete | None = None,
) -> DependencyList: ...
def validate_strip_class(
setting, value, option_parser, config_parser: Incomplete | None = None, config_section: Incomplete | None = None
setting,
value: Incomplete | None = None,
option_parser: Incomplete | None = None,
config_parser: Incomplete | None = None,
config_section: Incomplete | None = None,
): ...
def validate_smartquotes_locales(
setting, value, option_parser, config_parser: Incomplete | None = None, config_section: Incomplete | None = None
setting,
value: Incomplete | None = None,
option_parser: Incomplete | None = None,
config_parser: Incomplete | None = None,
config_section: Incomplete | None = None,
) -> list[tuple[str, str]]: ...
def make_paths_absolute(pathdict, keys, base_path: Incomplete | None = None) -> None: ...
def make_one_path_absolute(base_path, path) -> str: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/docutils/docutils/parsers/rst/states.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Inliner:
self, match: Match[str], lineno: int
) -> tuple[str, list[nodes.problematic], str, list[nodes.system_message]]: ...
def reference(
self, match: Match[str], lineno: int, anonymous: bool = ...
self, match: Match[str], lineno: int, anonymous: bool = False
) -> tuple[str, list[nodes.problematic], str, list[nodes.system_message]]: ...
def anonymous_reference(
self, match: Match[str], lineno: int
Expand Down
2 changes: 1 addition & 1 deletion stubs/docutils/docutils/parsers/rst/tableparser.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class SimpleTableParser(TableParser):
def parse_table(self) -> None: ...
def parse_columns(self, line: str, offset: int) -> list[tuple[int, int]]: ...
def init_row(self, colspec: list[tuple[int, int]], offset: int) -> list[_Cell]: ...
def parse_row(self, lines: list[str], start: int, spanline: tuple[str, int] | None = ...) -> None: ...
def parse_row(self, lines: list[str], start: int, spanline: tuple[str, int] | None = None) -> None: ...
def check_columns(self, lines: list[str], first_line: int, columns: list[tuple[int, int]]) -> None: ...
def structure_from_cells(self) -> tuple[_Colspecs, list[_Row], list[_Row]]: ...

Expand Down
5 changes: 3 additions & 2 deletions stubs/docutils/docutils/statemachine.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from collections.abc import Callable, Generator, Iterable, Iterator, Sequence
from re import Match, Pattern
from typing import Any, ClassVar, Generic, SupportsIndex, TypeVar, overload
Expand Down Expand Up @@ -43,7 +44,7 @@ class StateMachine(Generic[_Context]):
def insert_input(self, input_lines: list[str] | StringList, source: str) -> None: ...
def get_text_block(self, flush_left: bool = False) -> StringList: ...
def check_line(
self, context: _Context, state: State[_Context], transitions: list[str] | None = ...
self, context: _Context, state: State[_Context], transitions: list[str] | None = None
) -> _TransitionResult[_Context]: ...
def add_state(self, state_class: type[State[_Context]]) -> None: ...
def add_states(self, state_classes: Iterable[type[State[_Context]]]) -> None: ...
Expand Down Expand Up @@ -169,7 +170,7 @@ class ViewList(Generic[_T]):
def __iter__(self) -> Iterator[str]: ...

class StringList(ViewList[str]):
def trim_left(self, length: int, start: int = 0, end: int = ...) -> None: ...
def trim_left(self, length: int, start: int = 0, end: int = sys.maxsize) -> None: ...
def get_text_block(self, start: int, flush_left: bool = False) -> StringList: ...
def get_indented(
self,
Expand Down

0 comments on commit ae5c45b

Please sign in to comment.