mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 20:45:49 +08:00
[docutils] Add return types for a few docutils table methods (#14493)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import csv
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
from collections.abc import Callable, Sequence
|
||||
from typing import ClassVar, Final
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst import Directive
|
||||
|
||||
__docformat__: Final = "reStructuredText"
|
||||
@@ -20,7 +21,7 @@ class Table(Directive):
|
||||
def extend_short_rows_with_empty_cells(self, columns, parts) -> None: ...
|
||||
|
||||
class RSTTable(Table):
|
||||
def run(self): ...
|
||||
def run(self) -> Sequence[nodes.table | nodes.system_message]: ...
|
||||
|
||||
class CSVTable(Table):
|
||||
class DocutilsDialect(csv.Dialect):
|
||||
@@ -48,7 +49,7 @@ class CSVTable(Table):
|
||||
@staticmethod
|
||||
def check_requirements() -> None: ...
|
||||
def process_header_option(self): ...
|
||||
def run(self): ...
|
||||
def run(self) -> Sequence[nodes.table | nodes.system_message]: ...
|
||||
def get_csv_data(self): ...
|
||||
@staticmethod
|
||||
def decode_from_csv(s): ...
|
||||
@@ -57,6 +58,6 @@ class CSVTable(Table):
|
||||
def parse_csv_data_into_rows(self, csv_data, dialect, source): ...
|
||||
|
||||
class ListTable(Table):
|
||||
def run(self): ...
|
||||
def run(self) -> Sequence[nodes.table | nodes.system_message]: ...
|
||||
def check_list_content(self, node): ...
|
||||
def build_table_from_list(self, table_data, col_widths, header_rows, stub_columns): ...
|
||||
def build_table_from_list(self, table_data, col_widths, header_rows, stub_columns) -> nodes.table: ...
|
||||
|
||||
@@ -219,7 +219,7 @@ class Body(RSTState):
|
||||
def isolate_grid_table(self): ...
|
||||
def isolate_simple_table(self): ...
|
||||
def malformed_table(self, block, detail: str = "", offset: int = 0): ...
|
||||
def build_table(self, tabledata, tableline, stub_columns: int = 0, widths=None): ...
|
||||
def build_table(self, tabledata, tableline, stub_columns: int = 0, widths=None) -> nodes.table: ...
|
||||
def build_table_row(self, rowdata, tableline): ...
|
||||
explicit: Incomplete
|
||||
def footnote(self, match): ...
|
||||
|
||||
Reference in New Issue
Block a user