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)
| Parameter | Kind | Annotation | Default |
|---|---|---|---|
self | positional or keyword | Not annotated | No default |
code_file | positional or keyword | Not annotated | None |
code_string | positional or keyword | Not annotated | None |
language | positional or keyword | Not annotated | None |
formatter_style | positional or keyword | Not annotated | 'vim' |
tab_width | positional or keyword | Not annotated | 4 |
add_line_numbers | positional or keyword | Not annotated | True |
line_numbers_from | positional or keyword | Not annotated | 1 |
background | positional or keyword | Not annotated | 'rectangle' |
background_config | positional or keyword | Not annotated | None |
paragraph_config | positional or keyword | Not annotated | None |
Return annotation: Not annotated
No docstring declared here. Consult the source and host reference.
Code.code_string
Code.code_string(self)Decorators: property
| Parameter | Kind | Annotation | Default |
|---|---|---|---|
self | positional or keyword | Not annotated | No default |
Return annotation: Not annotated
The current normalized source as observed from retained Rust rows.
Code.get_styles_list
Code.get_styles_list()Decorators: staticmethod
| Parameter | Kind | Annotation | Default |
|---|
Return annotation: Not annotated
No docstring declared here. Consult the source and host reference.
Code.get_languages_list
Code.get_languages_list()Decorators: staticmethod
| Parameter | Kind | Annotation | Default |
|---|
Return annotation: Not annotated
No docstring declared here. Consult the source and host reference.
Code.get_pygments_style
Code.get_pygments_style(style)Decorators: staticmethod
| Parameter | Kind | Annotation | Default |
|---|---|---|---|
style | positional or keyword | Not annotated | No default |
Return annotation: Not annotated
No docstring declared here. Consult the source and host reference.