On this page

Code

from noon import Code

Source-derived class. Host availability is not inferred from this listing. See reference scope.

Bases: _compat.VGroup. Declared members follow; inherited and dynamically attached members are not expanded.

Retained, syntax-colored source lines with native tab and gutter layout.

Indentation and empty lines are preserved. This display object does not
format source code. Use ``get_languages_list`` and ``get_styles_list`` for
the shared engine’s supported language and theme profiles.

Code.__init__

Code.__init__(self, code_file=None, code_string=None, language=None, formatter_style='vim', tab_width=4, add_line_numbers=True, line_numbers_from=1, background='rectangle', background_config=None, paragraph_config=None)
ParameterKindAnnotationDefault
selfpositional or keywordNot annotatedNo default
code_filepositional or keywordNot annotatedNone
code_stringpositional or keywordNot annotatedNone
languagepositional or keywordNot annotatedNone
formatter_stylepositional or keywordNot annotated'vim'
tab_widthpositional or keywordNot annotated4
add_line_numberspositional or keywordNot annotatedTrue
line_numbers_frompositional or keywordNot annotated1
backgroundpositional or keywordNot annotated'rectangle'
background_configpositional or keywordNot annotatedNone
paragraph_configpositional or keywordNot annotatedNone

Return annotation: Not annotated

No docstring declared here. Consult the source and host reference.

Source declaration

Code.code_string

Code.code_string(self)

Decorators: property

ParameterKindAnnotationDefault
selfpositional or keywordNot annotatedNo default

Return annotation: Not annotated

The current normalized source as observed from retained Rust rows.

Source declaration

Code.get_styles_list

Code.get_styles_list()

Decorators: staticmethod

ParameterKindAnnotationDefault

Return annotation: Not annotated

No docstring declared here. Consult the source and host reference.

Source declaration

Code.get_languages_list

Code.get_languages_list()

Decorators: staticmethod

ParameterKindAnnotationDefault

Return annotation: Not annotated

No docstring declared here. Consult the source and host reference.

Source declaration

Code.get_pygments_style

Code.get_pygments_style(style)

Decorators: staticmethod

ParameterKindAnnotationDefault
stylepositional or keywordNot annotatedNo default

Return annotation: Not annotated

No docstring declared here. Consult the source and host reference.

Source declaration