Module specs._types._table
TypedDicts for use in table_specs.py
Classes
class TableSpec (*args, **kwargs)
-
TypedDict representing args/configuration items for parsing the tables of a single section.
Attributes
save_full_text
:bool
- if True, save the full text of the table
split_table_columns
:list[str]
- list of column names to split on
row_indent
:int
- lines indented by at least this many spaces are appended to the list of lines in the previous table.
force_table_names
:list[ForceNameTuple]
- list of tuples of check functions and names to force if the check function returns True when passed a current table's title.
rollup_cascade_reference
:RollupCascadeManager
- container class for defining rollup/cascade operations.
heading_indent
:int
- lines indented by exactly this many spaces are autmotically considered to be table headings.
stripped_head_key
:str
- key to use when storing data stripped from a table heading.
heading_contains
:list[str]
- list of strings to check for in the line to detect it as a table heading.
start_checks
:list[TableStartCheck]
- list of tuples of check functions for starting new tables.
end_checks
:list[TableEndCheck]
- list of tuples of check functions for ending the current table.
interpreter
:Callable
- function to interpret the table
interpreter_kwargs
:SwappingInterpreterKwArgs
- kwargs for interpreter
process_residual
:bool
- if True, process residual text after removing all lines assigned to other tables.
heading_breaks
:list[HBTuple]
- list of tuples of break strings to remove unwanted data from table titles. Inherited from section specs.
Ancestors
- builtins.dict
Class variables
var end_checks : list[utilities.table_utils.TableEndCheck]
var force_table_names : list[utilities.section_utils.ForceNameTuple]
var heading_breaks : list[utilities.section_utils.HBTuple]
var heading_contains : list[str]
var heading_indent : int
var interpreter : collections.abc.Callable[..., list[dict[str, str]] | utilities.table_utils.SubtableParser]
var interpreter_kwargs : utilities.table_utils.SwappingInterpreterKwArgs
var process_residual : bool
var rollup_cascade_reference : RollupCascadeManager
var row_indent : int
var save_full_text : bool
var split_table_columns : list[str]
var start_checks : list[utilities.table_utils.TableStartCheck]
var stripped_head_key : str