module documentation

Undocumented

Function color Undocumented
Function color2 Pain text colorize.
Function color_re Undocumented
Function colorhtml Undocumented
Function extract_expr Undocumented
Function test_ast_annotation Undocumented
Function test_ast_attribute Undocumented
Function test_ast_bin_op Undocumented
Function test_ast_bool_op Undocumented
Function test_ast_call Undocumented
Function test_ast_call_args Undocumented
Function test_ast_constants Undocumented
Function test_ast_dict Undocumented
Function test_ast_ellipsis Undocumented
Function test_ast_list_tuple Undocumented
Function test_ast_regex Undocumented
Function test_ast_set Undocumented
Function test_ast_slice Undocumented
Function test_ast_unary_op Undocumented
Function test_buggy_live_object Undocumented
Function test_bytes_multiline Undocumented
Function test_bytes_str Binary strings (bytes) are handled properly:
Function test_crash_surrogates_not_allowed Test that the colorizer does not make the flatten function crash when passing surrogates unicode strings.
Function test_custom_live_object Undocumented
Function test_dictionaries Dicts are treated just like lists, except that the ":" is also tagged as "op".
Function test_frozenset Undocumented
Function test_inline_list Lists, tuples, and sets are all colorized using the same method. The braces and commas are tagged with "op". If the value can fit on the current line, it is displayed on one line. Otherwise, each value is listed on a separate line, indented by the size of the open-bracket.
Function test_line_wrapping Undocumented
Function test_long_numbers Long ints will get wrapped if they're big enough.
Function test_multiline_list Undocumented
Function test_multiline_list2 Undocumented
Function test_multiline_set Undocumented
Function test_non_breaking_spaces This test might fail in the future, when twisted's XMLString supports XHTML entities (see https://github.com/twisted/twisted/issues/11581). But it will always fail for python 3.6 since twisted dropped support for these versions of python.
Function test_operator_precedences Undocumented
Function test_re_branching Undocumented
Function test_re_char_classes Undocumented
Function test_re_flags Undocumented
Function test_re_literals Undocumented
Function test_re_lookahead_behinds Undocumented
Function test_re_multiline Undocumented
Function test_re_named_groups Undocumented
Function test_re_not_literal Undocumented
Function test_re_ranges Undocumented
Function test_re_references Undocumented
Function test_re_repeats Undocumented
Function test_re_subpatterns Undocumented
Function test_repr_text Test a few representations, with a plain text version.
Function test_simple_types Integers, floats, None, and complex numbers get printed using str, with no syntax highlighting.
Function test_strings Strings have their quotation marks tagged as 'quote'. Characters are escaped using the 'string-escape' encoding.
Function test_strings_multiline Strings containing newlines are automatically rendered as multiline strings.
Function test_strings_quote Currently, the "'" quote is always used, because that's what the 'string-escape' encoding expects.
Function test_strings_special_chars Undocumented
Function test_summary To generate summary-reprs, use maxlines=1 and linebreakok=False:
Function test_surrogates_cars_in_re Regex string are escaped their own way. See https://github.com/twisted/pydoctor/pull/493
Function test_tuples_one_value Tuples that contains only one value need an ending comma.
Function test_unicode_str Unicode strings are handled properly.
def color(v, linebreakok=True, maxlines=5, linelen=40): (source)

Undocumented

Parameters
v:AnyUndocumented
linebreakok:boolUndocumented
maxlines:intUndocumented
linelen:intUndocumented
Returns
strUndocumented
def color2(v, linelen=50): (source)

Pain text colorize.

Parameters
v:AnyUndocumented
linelen:intUndocumented
Returns
strUndocumented
def color_re(s, check_roundtrip=True): (source)

Undocumented

Parameters
s:Union[bytes, str]Undocumented
check_roundtrip:boolUndocumented
Returns
strUndocumented
def colorhtml(v, linebreakok=True, maxlines=5, linelen=40): (source)

Undocumented

Parameters
v:AnyUndocumented
linebreakok:boolUndocumented
maxlines:intUndocumented
linelen:intUndocumented
Returns
strUndocumented
def extract_expr(_ast): (source)

Undocumented

Parameters
_ast:ast.ModuleUndocumented
Returns
ast.ASTUndocumented
def test_ast_annotation(): (source)

Undocumented

def test_ast_attribute(): (source)

Undocumented

def test_ast_bin_op(): (source)

Undocumented

def test_ast_bool_op(): (source)

Undocumented

def test_ast_call(): (source)

Undocumented

def test_ast_call_args(): (source)

Undocumented

def test_ast_constants(): (source)

Undocumented

def test_ast_dict(): (source)

Undocumented

def test_ast_ellipsis(): (source)

Undocumented

def test_ast_list_tuple(): (source)

Undocumented

def test_ast_regex(): (source)

Undocumented

def test_ast_set(): (source)

Undocumented

def test_ast_slice(): (source)

Undocumented

def test_ast_unary_op(): (source)

Undocumented

def test_buggy_live_object(): (source)

Undocumented

def test_bytes_multiline(): (source)

Undocumented

def test_bytes_str(): (source)

Binary strings (bytes) are handled properly:

def test_crash_surrogates_not_allowed(): (source)

Test that the colorizer does not make the flatten function crash when passing surrogates unicode strings.

def test_custom_live_object(): (source)

Undocumented

def test_dictionaries(): (source)

Dicts are treated just like lists, except that the ":" is also tagged as "op".

def test_frozenset(): (source)

Undocumented

def test_inline_list(): (source)

Lists, tuples, and sets are all colorized using the same method. The braces and commas are tagged with "op". If the value can fit on the current line, it is displayed on one line. Otherwise, each value is listed on a separate line, indented by the size of the open-bracket.

def test_line_wrapping(): (source)

Undocumented

def test_long_numbers(): (source)

Long ints will get wrapped if they're big enough.

def test_multiline_list(): (source)

Undocumented

def test_multiline_list2(): (source)

Undocumented

def test_multiline_set(): (source)

Undocumented

def test_non_breaking_spaces(): (source)

This test might fail in the future, when twisted's XMLString supports XHTML entities (see https://github.com/twisted/twisted/issues/11581). But it will always fail for python 3.6 since twisted dropped support for these versions of python.

def test_operator_precedences(): (source)

Undocumented

def test_re_branching(): (source)

Undocumented

def test_re_char_classes(): (source)

Undocumented

def test_re_flags(): (source)

Undocumented

def test_re_literals(): (source)

Undocumented

def test_re_lookahead_behinds(): (source)

Undocumented

def test_re_multiline(): (source)

Undocumented

def test_re_named_groups(): (source)

Undocumented

def test_re_not_literal(): (source)

Undocumented

def test_re_ranges(): (source)

Undocumented

def test_re_references(): (source)

Undocumented

def test_re_repeats(): (source)

Undocumented

def test_re_subpatterns(): (source)

Undocumented

def test_repr_text(): (source)

Test a few representations, with a plain text version.

def test_simple_types(): (source)

Integers, floats, None, and complex numbers get printed using str, with no syntax highlighting.

def test_strings(): (source)

Strings have their quotation marks tagged as 'quote'. Characters are escaped using the 'string-escape' encoding.

def test_strings_multiline(): (source)

Strings containing newlines are automatically rendered as multiline strings.

def test_strings_quote(): (source)

Currently, the "'" quote is always used, because that's what the 'string-escape' encoding expects.

def test_strings_special_chars(): (source)

Undocumented

def test_summary(): (source)

To generate summary-reprs, use maxlines=1 and linebreakok=False:

def test_surrogates_cars_in_re(): (source)

Regex string are escaped their own way. See https://github.com/twisted/pydoctor/pull/493

def test_tuples_one_value(): (source)

Tuples that contains only one value need an ending comma.

def test_unicode_str(): (source)

Unicode strings are handled properly.