omnipy.shared.enums.display
Display-related literal enums for formatting, syntax highlighting, and layout.
| CLASS | DESCRIPTION |
|---|---|
DarkBackground |
Specify whether the output background is dark or light. |
DisplayColorSystem |
Supported display color systems for syntax highlighting. |
DisplayDimensionsUpdateMode |
Specify how display dimensions should be updated. |
HexdumpSyntaxLanguage |
Hexdump syntax language enum values for binary output highlighting. |
HorizontalOverflowMode |
Horizontal overflow modes for rendered output. |
JsonSyntaxLanguage |
JSON-family syntax language enum values for syntax highlighting. |
Justify |
Justification modes for rendered output. |
MaxTitleHeight |
Maximum title height enum values for rendered display panels. |
PanelDesign |
Visual design for rendered output layouts. |
PrettyPrinterLib |
Supported libraries for pretty printing various data structures. |
PythonSyntaxLanguage |
Python syntax language enum values for code highlighting. |
SyntaxLanguage |
Supported languages for syntax recognition and highlighting. |
SyntaxLanguageSpec |
Specification of language for syntax recognition and highlighting. |
TextSyntaxLanguage |
General text syntax language enum values for syntax highlighting. |
VerticalOverflowMode |
Vertical overflow modes for rendered output. |
DarkBackground
Bases: LiteralEnum[str | bool]
flowchart BT
omnipy.shared.enums.display.DarkBackground[DarkBackground]
omnipy.util.literal_enum.LiteralEnum[LiteralEnum]
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.DarkBackground
click omnipy.shared.enums.display.DarkBackground href "" "omnipy.shared.enums.display.DarkBackground"
click omnipy.util.literal_enum.LiteralEnum href "" "omnipy.util.literal_enum.LiteralEnum"
Specify whether the output background is dark or light.
This is used for selecting the appropriate color scheme for syntax highlighting and other color styles. The dark background mode is automatically detected based on the terminal capabilities, but can be overridden by the user in the configs.
| ATTRIBUTE | DESCRIPTION |
|---|---|
AUTO |
Automatically detects whether the background color of the output is dark or light.
TYPE:
|
FALSE |
Specifies that the background color of the output is light.
TYPE:
|
Literals |
|
TRUE |
Specifies that the background color of the output is dark.
TYPE:
|
Source code in src/omnipy/shared/enums/display.py
AUTO
class-attribute
instance-attribute
Automatically detects whether the background color of the output is dark or light.
FALSE
class-attribute
instance-attribute
Specifies that the background color of the output is light.
Literals
class-attribute
instance-attribute
DisplayColorSystem
Bases: LiteralEnum[str]
flowchart BT
omnipy.shared.enums.display.DisplayColorSystem[DisplayColorSystem]
omnipy.util.literal_enum.LiteralEnum[LiteralEnum]
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.DisplayColorSystem
click omnipy.shared.enums.display.DisplayColorSystem href "" "omnipy.shared.enums.display.DisplayColorSystem"
click omnipy.util.literal_enum.LiteralEnum href "" "omnipy.util.literal_enum.LiteralEnum"
Supported display color systems for syntax highlighting.
The color systems map to the color systems provided by the Rich library (https://rich.readthedocs.io/en/stable/console.html#color-systems). The names of the Omnipy attributes have been slightly modified to be more descriptive.
- Reference Code reference omnipy
- Reference Code reference
| ATTRIBUTE | DESCRIPTION |
|---|---|
ANSI_16 |
Use the standard ANSI color system with 16 colors.
TYPE:
|
ANSI_256 |
Use the extended ANSI color system with 256 colors.
TYPE:
|
ANSI_RGB |
Use the ANSI truecolor system.
TYPE:
|
AUTO |
Automatically detect the display color system.
TYPE:
|
Literals |
|
WINDOWS_LEGACY |
Use the legacy Windows color system.
TYPE:
|
Source code in src/omnipy/shared/enums/display.py
ANSI_16
class-attribute
instance-attribute
Use the standard ANSI color system with 16 colors.
ANSI_256
class-attribute
instance-attribute
Use the extended ANSI color system with 256 colors.
ANSI_RGB
class-attribute
instance-attribute
Use the ANSI truecolor system.
The truecolor ANSI color system, which supports 16 million colors. Most modern terminals support this color system.
AUTO
class-attribute
instance-attribute
Automatically detect the display color system.
The default color system, which is automatically detected based on the terminal capabilities. This is the default value.
-
Reference
Code reference
omnipy
config
dataColorConfigsystem
Literals
class-attribute
instance-attribute
- Reference Code reference omnipy
DisplayDimensionsUpdateMode
Bases: LiteralEnum[str]
flowchart BT
omnipy.shared.enums.display.DisplayDimensionsUpdateMode[DisplayDimensionsUpdateMode]
omnipy.util.literal_enum.LiteralEnum[LiteralEnum]
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.DisplayDimensionsUpdateMode
click omnipy.shared.enums.display.DisplayDimensionsUpdateMode href "" "omnipy.shared.enums.display.DisplayDimensionsUpdateMode"
click omnipy.util.literal_enum.LiteralEnum href "" "omnipy.util.literal_enum.LiteralEnum"
Specify how display dimensions should be updated.
- Reference Code reference omnipy
| ATTRIBUTE | DESCRIPTION |
|---|---|
AUTO |
Automatically update display dimensions.
TYPE:
|
FIXED |
Keep display dimensions fixed after initial detection.
TYPE:
|
Literals |
|
Source code in src/omnipy/shared/enums/display.py
AUTO
class-attribute
instance-attribute
Automatically update display dimensions.
Automatically updates the width and height dimension configs of the
relevant interface output based on the currently available display area
every time some output renders or (in some cases) when there is a change
in the available display area (e.g. a window is resized). Automatic
updates might not work in cases when the available display area can be
automatically determined (which is e.g. the case for PYCHARM_TERMINAL
and PYCHARM_IPYTHON user interface types). In those cases, the
specified dimensions are kept unchanged. Default values are defined for
each type of user interface .
FIXED
class-attribute
instance-attribute
Keep display dimensions fixed after initial detection.
Updates the width and height dimension config according to the
available display area only once at the start of the program. Default
values are defined for each type of user interface. The default values
can be overridden by the user in the configs, however users are then
advised to first set dims_mode to FIXED even when the current
display area cannot be automatically determined. Setting dims_mode to
FIXED retains the current dimensions at the time of the setting.
Literals
class-attribute
instance-attribute
HexdumpSyntaxLanguage
Bases: LiteralEnum[str]
flowchart BT
omnipy.shared.enums.display.HexdumpSyntaxLanguage[HexdumpSyntaxLanguage]
omnipy.util.literal_enum.LiteralEnum[LiteralEnum]
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.HexdumpSyntaxLanguage
click omnipy.shared.enums.display.HexdumpSyntaxLanguage href "" "omnipy.shared.enums.display.HexdumpSyntaxLanguage"
click omnipy.util.literal_enum.LiteralEnum href "" "omnipy.util.literal_enum.LiteralEnum"
Hexdump syntax language enum values for binary output highlighting.
- Reference Code reference
-
Reference
Code reference
omnipy
shared
enums
displaySyntaxLanguage
| ATTRIBUTE | DESCRIPTION |
|---|---|
HEXDUMP |
TYPE:
|
Literals |
|
Source code in src/omnipy/shared/enums/display.py
Literals
class-attribute
instance-attribute
- Reference Code reference
HorizontalOverflowMode
Bases: LiteralEnum[str]
flowchart BT
omnipy.shared.enums.display.HorizontalOverflowMode[HorizontalOverflowMode]
omnipy.util.literal_enum.LiteralEnum[LiteralEnum]
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.HorizontalOverflowMode
click omnipy.shared.enums.display.HorizontalOverflowMode href "" "omnipy.shared.enums.display.HorizontalOverflowMode"
click omnipy.util.literal_enum.LiteralEnum href "" "omnipy.util.literal_enum.LiteralEnum"
Horizontal overflow modes for rendered output.
Horizontal overflow modes have no effect on layout panels.
The horizontal overflow modes are:
- ELLIPSIS: Adds an ellipsis (...) at the end of the line if it
exceeds the width.
- CROP: Crops the line to fit within the width, without adding an
ellipsis.
- WRAP: Wraps the line to the next line if it exceeds the
width, breaking according to the specified syntax language.
- Reference Code reference omnipy
| ATTRIBUTE | DESCRIPTION |
|---|---|
CROP |
TYPE:
|
ELLIPSIS |
TYPE:
|
Literals |
|
WRAP |
TYPE:
|
Source code in src/omnipy/shared/enums/display.py
ELLIPSIS
class-attribute
instance-attribute
-
Reference
Code reference
omnipy
config
dataOverflowConfighorizontal
Literals
class-attribute
instance-attribute
- Reference Code reference omnipy
JsonSyntaxLanguage
Bases: LiteralEnum[str]
flowchart BT
omnipy.shared.enums.display.JsonSyntaxLanguage[JsonSyntaxLanguage]
omnipy.util.literal_enum.LiteralEnum[LiteralEnum]
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.JsonSyntaxLanguage
click omnipy.shared.enums.display.JsonSyntaxLanguage href "" "omnipy.shared.enums.display.JsonSyntaxLanguage"
click omnipy.util.literal_enum.LiteralEnum href "" "omnipy.util.literal_enum.LiteralEnum"
JSON-family syntax language enum values for syntax highlighting.
- Reference Code reference
-
Reference
Code reference
omnipy
shared
enums
displaySyntaxLanguage
| ATTRIBUTE | DESCRIPTION |
|---|---|
JSON |
TYPE:
|
JSON5 |
TYPE:
|
JSON_LD |
TYPE:
|
Literals |
|
Source code in src/omnipy/shared/enums/display.py
Literals
class-attribute
instance-attribute
- Reference Code reference
Justify
Bases: LiteralEnum[str]
flowchart BT
omnipy.shared.enums.display.Justify[Justify]
omnipy.util.literal_enum.LiteralEnum[LiteralEnum]
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.Justify
click omnipy.shared.enums.display.Justify href "" "omnipy.shared.enums.display.Justify"
click omnipy.util.literal_enum.LiteralEnum href "" "omnipy.util.literal_enum.LiteralEnum"
Justification modes for rendered output.
The justification modes are:
- LEFT: Left-justified text.
- RIGHT: Right-justified text.
- CENTER: Centered text.
- Reference Code reference omnipy
| ATTRIBUTE | DESCRIPTION |
|---|---|
CENTER |
TYPE:
|
LEFT |
TYPE:
|
Literals |
|
RIGHT |
TYPE:
|
Source code in src/omnipy/shared/enums/display.py
LEFT
class-attribute
instance-attribute
-
Reference
Code reference
omnipy
config
dataLayoutConfigjustify
Literals
class-attribute
instance-attribute
MaxTitleHeight
Bases: LiteralEnum[int]
flowchart BT
omnipy.shared.enums.display.MaxTitleHeight[MaxTitleHeight]
omnipy.util.literal_enum.LiteralEnum[LiteralEnum]
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.MaxTitleHeight
click omnipy.shared.enums.display.MaxTitleHeight href "" "omnipy.shared.enums.display.MaxTitleHeight"
click omnipy.util.literal_enum.LiteralEnum href "" "omnipy.util.literal_enum.LiteralEnum"
Maximum title height enum values for rendered display panels.
- Reference Code reference omnipy
| ATTRIBUTE | DESCRIPTION |
|---|---|
AUTO |
TYPE:
|
Literals |
|
ONE |
TYPE:
|
TWO |
TYPE:
|
ZERO |
TYPE:
|
Source code in src/omnipy/shared/enums/display.py
AUTO
class-attribute
instance-attribute
-
Reference
Code reference
omnipy
config
dataLayoutConfigmax_title_height
Literals
class-attribute
instance-attribute
- Reference Code reference omnipy
PanelDesign
Bases: LiteralEnum[str]
flowchart BT
omnipy.shared.enums.display.PanelDesign[PanelDesign]
omnipy.util.literal_enum.LiteralEnum[LiteralEnum]
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.PanelDesign
click omnipy.shared.enums.display.PanelDesign href "" "omnipy.shared.enums.display.PanelDesign"
click omnipy.util.literal_enum.LiteralEnum href "" "omnipy.util.literal_enum.LiteralEnum"
Visual design for rendered output layouts.
The layout designs are:
- TABLE: The output is displayed as a simple table grid
- TABLE_SHOW_STYLE: The output is displayed as a simple table grid
- PANELS: The output is displayed as a set of panels
- Reference Code reference omnipy
| ATTRIBUTE | DESCRIPTION |
|---|---|
Literals |
|
PANELS |
TYPE:
|
TABLE |
TYPE:
|
TABLE_SHOW_STYLE |
TYPE:
|
Source code in src/omnipy/shared/enums/display.py
Literals
class-attribute
instance-attribute
- Reference Code reference omnipy
TABLE
class-attribute
instance-attribute
-
Reference
Code reference
omnipy
config
dataLayoutConfigpanel_design
PrettyPrinterLib
Bases: LiteralEnum[str]
flowchart BT
omnipy.shared.enums.display.PrettyPrinterLib[PrettyPrinterLib]
omnipy.util.literal_enum.LiteralEnum[LiteralEnum]
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.PrettyPrinterLib
click omnipy.shared.enums.display.PrettyPrinterLib href "" "omnipy.shared.enums.display.PrettyPrinterLib"
click omnipy.util.literal_enum.LiteralEnum href "" "omnipy.util.literal_enum.LiteralEnum"
Supported libraries for pretty printing various data structures.
Comparison of RICH and DEVTOOLS for Python structures: the outputs are
more or less the same. However, the RICH library formats the width of
the output on a per-item basis, while the DEVTOOLS library formats the
width of the output based on the maximum width of the output. This means
that the RICH library will in many cases produce a more compact output,
which is typically recommended. However, the DEVTOOLS library might be
more suitable for visualizing Pydantic models with debug_mode set to
True, as it is specifically designed for that purpose.
- Reference Code reference omnipy
| ATTRIBUTE | DESCRIPTION |
|---|---|
AUTO |
Automatically selects the pretty printer.
TYPE:
|
CODE |
Code pretty printer.
TYPE:
|
COLUMN |
Column pretty printer.
TYPE:
|
COMPACT_JSON |
Compact JSON pretty printer.
TYPE:
|
DEVTOOLS |
Devtools pretty printer for Python objects.
TYPE:
|
HEXDUMP |
Hexdump pretty printer.
TYPE:
|
Literals |
|
RICH |
Rich pretty printer for Python objects.
TYPE:
|
TEXT |
Text pretty printer.
TYPE:
|
Source code in src/omnipy/shared/enums/display.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | |
AUTO
class-attribute
instance-attribute
Automatically selects the pretty printer.
The auto-selection of the pretty printer is based on:
-
Autodetection of the pretty printer based on specific content types, such as StrModel, ColumnModel, or PrintableTable.
-
The
syntaxconfig parameter, if other thanAUTO. The pretty printer is set to the default pretty printer for the specified syntax language subgroup (see subtypes ofSyntaxLanguage). -
If the
syntaxconfig parameter is set toAUTO, the pretty printer is finally determined based on the content of the output, this time in default mode.
the default pretty printer for a syntax language subgroup is
currently determined in the get_pretty_printer_from_syntax()
function in omnipy.data._display.text.pretty_printer.register,
while the mapping of content types to pretty printers is determined
in the get_pretty_printer_from_content() function in the same
module, based on the is_suitable_content() method of each pretty
printer class. The implementation of determining the pretty printer
when set to AUTO will likely change in the future.
-
Reference
Code reference
omnipy
config
dataTextConfigpretty_printer
CODE
class-attribute
instance-attribute
Code pretty printer.
The code pretty printer, which is used for displaying plain text containing code. The default syntax is Python.
COLUMN
class-attribute
instance-attribute
Column pretty printer.
The column pretty printer is the basis for tabular data display in Omnipy, with the regular panel layout providing the table formatting.
COMPACT_JSON
class-attribute
instance-attribute
Compact JSON pretty printer.
The compact-json library (https://github.com/masaccio/compact-json), which is used for compact formatting of JSON data structures.
DEVTOOLS
class-attribute
instance-attribute
Devtools pretty printer for Python objects.
The pretty printer of the Devtools library (https://python-devtools.helpmanual.io/), a general-purpose formatter of Python objects and specifically designed for visualizing Pydantic models.
HEXDUMP
class-attribute
instance-attribute
Hexdump pretty printer.
Hexdump pretty printer based on simple-hexdump for displaying binary content.
Literals
class-attribute
instance-attribute
- Reference Code reference omnipy
RICH
class-attribute
instance-attribute
Rich pretty printer for Python objects.
The pretty printer of Rich library (https://rich.readthedocs.io/en/stable/), a general-purpose formatter of Python objects. This is the default value.
PythonSyntaxLanguage
Bases: LiteralEnum[str]
flowchart BT
omnipy.shared.enums.display.PythonSyntaxLanguage[PythonSyntaxLanguage]
omnipy.util.literal_enum.LiteralEnum[LiteralEnum]
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.PythonSyntaxLanguage
click omnipy.shared.enums.display.PythonSyntaxLanguage href "" "omnipy.shared.enums.display.PythonSyntaxLanguage"
click omnipy.util.literal_enum.LiteralEnum href "" "omnipy.util.literal_enum.LiteralEnum"
Python syntax language enum values for code highlighting.
- Reference Code reference
-
Reference
Code reference
omnipy
shared
enums
displaySyntaxLanguage
| ATTRIBUTE | DESCRIPTION |
|---|---|
Literals |
|
PYTHON |
TYPE:
|
Source code in src/omnipy/shared/enums/display.py
Literals
class-attribute
instance-attribute
- Reference Code reference
SyntaxLanguage
Bases: JsonSyntaxLanguage, TextSyntaxLanguage, HexdumpSyntaxLanguage, PythonSyntaxLanguage
flowchart BT
omnipy.shared.enums.display.SyntaxLanguage[SyntaxLanguage]
omnipy.shared.enums.display.JsonSyntaxLanguage[JsonSyntaxLanguage]
omnipy.shared.enums.display.TextSyntaxLanguage[TextSyntaxLanguage]
omnipy.shared.enums.display.HexdumpSyntaxLanguage[HexdumpSyntaxLanguage]
omnipy.shared.enums.display.PythonSyntaxLanguage[PythonSyntaxLanguage]
omnipy.util.literal_enum.LiteralEnum[LiteralEnum]
omnipy.shared.enums.display.JsonSyntaxLanguage --> omnipy.shared.enums.display.SyntaxLanguage
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.JsonSyntaxLanguage
omnipy.shared.enums.display.TextSyntaxLanguage --> omnipy.shared.enums.display.SyntaxLanguage
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.TextSyntaxLanguage
omnipy.shared.enums.display.HexdumpSyntaxLanguage --> omnipy.shared.enums.display.SyntaxLanguage
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.HexdumpSyntaxLanguage
omnipy.shared.enums.display.PythonSyntaxLanguage --> omnipy.shared.enums.display.SyntaxLanguage
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.PythonSyntaxLanguage
click omnipy.shared.enums.display.SyntaxLanguage href "" "omnipy.shared.enums.display.SyntaxLanguage"
click omnipy.shared.enums.display.JsonSyntaxLanguage href "" "omnipy.shared.enums.display.JsonSyntaxLanguage"
click omnipy.shared.enums.display.TextSyntaxLanguage href "" "omnipy.shared.enums.display.TextSyntaxLanguage"
click omnipy.shared.enums.display.HexdumpSyntaxLanguage href "" "omnipy.shared.enums.display.HexdumpSyntaxLanguage"
click omnipy.shared.enums.display.PythonSyntaxLanguage href "" "omnipy.shared.enums.display.PythonSyntaxLanguage"
click omnipy.util.literal_enum.LiteralEnum href "" "omnipy.util.literal_enum.LiteralEnum"
Supported languages for syntax recognition and highlighting.
A selected subset of the lexer languages supported by the Pygments library (https://pygments.org/languages/), assumed to be the ones most relevant for Omnipy.
- Reference Code reference
- Reference Code reference
- Reference Code reference
| ATTRIBUTE | DESCRIPTION |
|---|---|
Literals |
|
Source code in src/omnipy/shared/enums/display.py
Literals
class-attribute
instance-attribute
Literals = Literal[
JsonSyntaxLanguage.Literals,
TextSyntaxLanguage.Literals,
HexdumpSyntaxLanguage.Literals,
PythonSyntaxLanguage.Literals,
]
- Reference Code reference
- Reference Code reference
SyntaxLanguageSpec
Bases: SyntaxLanguage
flowchart BT
omnipy.shared.enums.display.SyntaxLanguageSpec[SyntaxLanguageSpec]
omnipy.shared.enums.display.SyntaxLanguage[SyntaxLanguage]
omnipy.shared.enums.display.JsonSyntaxLanguage[JsonSyntaxLanguage]
omnipy.shared.enums.display.TextSyntaxLanguage[TextSyntaxLanguage]
omnipy.shared.enums.display.HexdumpSyntaxLanguage[HexdumpSyntaxLanguage]
omnipy.shared.enums.display.PythonSyntaxLanguage[PythonSyntaxLanguage]
omnipy.util.literal_enum.LiteralEnum[LiteralEnum]
omnipy.shared.enums.display.SyntaxLanguage --> omnipy.shared.enums.display.SyntaxLanguageSpec
omnipy.shared.enums.display.JsonSyntaxLanguage --> omnipy.shared.enums.display.SyntaxLanguage
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.JsonSyntaxLanguage
omnipy.shared.enums.display.TextSyntaxLanguage --> omnipy.shared.enums.display.SyntaxLanguage
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.TextSyntaxLanguage
omnipy.shared.enums.display.HexdumpSyntaxLanguage --> omnipy.shared.enums.display.SyntaxLanguage
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.HexdumpSyntaxLanguage
omnipy.shared.enums.display.PythonSyntaxLanguage --> omnipy.shared.enums.display.SyntaxLanguage
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.PythonSyntaxLanguage
click omnipy.shared.enums.display.SyntaxLanguageSpec href "" "omnipy.shared.enums.display.SyntaxLanguageSpec"
click omnipy.shared.enums.display.SyntaxLanguage href "" "omnipy.shared.enums.display.SyntaxLanguage"
click omnipy.shared.enums.display.JsonSyntaxLanguage href "" "omnipy.shared.enums.display.JsonSyntaxLanguage"
click omnipy.shared.enums.display.TextSyntaxLanguage href "" "omnipy.shared.enums.display.TextSyntaxLanguage"
click omnipy.shared.enums.display.HexdumpSyntaxLanguage href "" "omnipy.shared.enums.display.HexdumpSyntaxLanguage"
click omnipy.shared.enums.display.PythonSyntaxLanguage href "" "omnipy.shared.enums.display.PythonSyntaxLanguage"
click omnipy.util.literal_enum.LiteralEnum href "" "omnipy.util.literal_enum.LiteralEnum"
Specification of language for syntax recognition and highlighting.
The available values include all supported syntax languages (see
SyntaxLanguage), plus the AUTO option for automatic syntax
recognition.
- Reference Code reference
| METHOD | DESCRIPTION |
|---|---|
is_hexdump_syntax |
Check whether the given syntax is a binary hexdump variant. |
is_json_syntax |
Check whether the given syntax is a JSON syntax. |
is_python_syntax |
Check whether the given syntax is a Python variant. |
is_supported_syntax_language |
Check whether the given syntax is a supported syntax language. |
is_syntax_language_spec |
Check for a valid syntax language specification. |
is_text_syntax |
Check whether the given syntax is a general text syntax. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
AUTO |
Automatically select the syntax language.
TYPE:
|
Literals |
|
Source code in src/omnipy/shared/enums/display.py
AUTO
class-attribute
instance-attribute
Automatically select the syntax language.
Automatically set the syntax language in accordance with the specified
pretty printer selected for the output (e.g. specified in printer
config parameter). The syntax language specified in the
get_default_syntax_language() class method is selected.
Literals
class-attribute
instance-attribute
Literals = Literal['auto', SyntaxLanguage.Literals]
- Reference Code reference
is_hexdump_syntax
classmethod
is_hexdump_syntax(syntax: str) -> TypeIs[HexdumpSyntaxLanguage.Literals]
Check whether the given syntax is a binary hexdump variant.
is_json_syntax
classmethod
is_json_syntax(syntax: str) -> TypeIs[JsonSyntaxLanguage.Literals]
is_python_syntax
classmethod
is_python_syntax(syntax: str) -> TypeIs[PythonSyntaxLanguage.Literals]
Check whether the given syntax is a Python variant.
is_supported_syntax_language
classmethod
is_supported_syntax_language(syntax: str) -> TypeIs[SyntaxLanguage.Literals]
Check whether the given syntax is a supported syntax language.
is_syntax_language_spec
classmethod
is_syntax_language_spec(syntax: str) -> TypeIs[SyntaxLanguageSpec.Literals]
Check for a valid syntax language specification.
This checks whether the syntax string is one of the supported
options for syntax language specification (including AUTO).
Source code in src/omnipy/shared/enums/display.py
is_text_syntax
classmethod
is_text_syntax(syntax: str) -> TypeIs[TextSyntaxLanguage.Literals]
Check whether the given syntax is a general text syntax.
TextSyntaxLanguage
Bases: LiteralEnum[str]
flowchart BT
omnipy.shared.enums.display.TextSyntaxLanguage[TextSyntaxLanguage]
omnipy.util.literal_enum.LiteralEnum[LiteralEnum]
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.TextSyntaxLanguage
click omnipy.shared.enums.display.TextSyntaxLanguage href "" "omnipy.shared.enums.display.TextSyntaxLanguage"
click omnipy.util.literal_enum.LiteralEnum href "" "omnipy.util.literal_enum.LiteralEnum"
General text syntax language enum values for syntax highlighting.
- Reference Code reference
-
Reference
Code reference
omnipy
shared
enums
displaySyntaxLanguage
| ATTRIBUTE | DESCRIPTION |
|---|---|
BASH |
TYPE:
|
CSS |
TYPE:
|
HTML |
TYPE:
|
Literals |
|
MARKDOWN |
TYPE:
|
NUMPY |
TYPE:
|
SPARQL |
TYPE:
|
SQL |
TYPE:
|
TEX |
TYPE:
|
TEXT |
TYPE:
|
TOML |
TYPE:
|
XML |
TYPE:
|
YAML |
TYPE:
|
Source code in src/omnipy/shared/enums/display.py
VerticalOverflowMode
Bases: LiteralEnum[str]
flowchart BT
omnipy.shared.enums.display.VerticalOverflowMode[VerticalOverflowMode]
omnipy.util.literal_enum.LiteralEnum[LiteralEnum]
omnipy.util.literal_enum.LiteralEnum --> omnipy.shared.enums.display.VerticalOverflowMode
click omnipy.shared.enums.display.VerticalOverflowMode href "" "omnipy.shared.enums.display.VerticalOverflowMode"
click omnipy.util.literal_enum.LiteralEnum href "" "omnipy.util.literal_enum.LiteralEnum"
Vertical overflow modes for rendered output.
Vertical overflow modes have no effect on layout panels.
The vertical overflow modes are:
- CROP_TOP: Crops the top of the output if it exceeds the height.
- CROP_BOTTOM: Crops the bottom of the output if it exceeds the
height.
- Reference Code reference omnipy
| ATTRIBUTE | DESCRIPTION |
|---|---|
CROP_BOTTOM |
TYPE:
|
CROP_TOP |
TYPE:
|
ELLIPSIS_BOTTOM |
TYPE:
|
ELLIPSIS_TOP |
TYPE:
|
Literals |
|