FormatOptions

class FormatOptions

Formatter options for Syside

Children
Members defined in FormatOptions (11 members)

binary

RW

Options for binary ends formatting:

breaks

RW

Options for declarations.

decl

RW

Options for declaration formatting.

empty_brackets

RW

Choose between {} and ; when formatting empty children blocks:

keywords

RW

Options for keyword formatting, switching between keywords and tokens, or omitting keywords where possible.

markdown

RW

Whether to treat Comment and Documentation bodies as Markdown.

parentheses

RW

Options for expression parentheses formatting:

strip_unnecessary_quotes

RW

Whether to strip quotes from quoted identifiers where possible.

synth

RW

Options for printing synthetic elements.

trailing_comma

RW

Options for trailing comma placement.

__init__

Attributes

property binary: syside.conf.BinaryEndsFormat

Options for binary ends formatting:

  • always: binary ends are printed as binary declaration

  • never: binary ends are printed as nary declaration

property breaks: syside.conf.BreakOptions

Options for declarations.

property decl: syside.conf.DeclFormat

Options for declaration formatting.

property empty_brackets: syside.conf.FormatPreserved[syside.conf.AlwaysNever]

Choose between {} and ; when formatting empty children blocks:

  • always: empty blocks are always formatted as {}

  • never: empty blocks are always formatted as a trailing ;

property keywords: syside.conf.KeywordOptions

Options for keyword formatting, switching between keywords and tokens, or omitting keywords where possible.

property markdown: bool

Whether to treat Comment and Documentation bodies as Markdown.

Markdown will preserve whitespace at the end of the lines since it is significant, otherwise it will be trimmed. This does not reformat paragraphs.

property parentheses: syside.conf.ParenthesesFormat

Options for expression parentheses formatting:

  • always: expression is printed with parentheses

  • never: expression is printed without parentheses

  • on-break: expression is printed with parentheses only if it breaks

property strip_unnecessary_quotes: bool

Whether to strip quotes from quoted identifiers where possible.

If true, quotes will be stripped from identifiers that have no restricted characters and do not clash with language keywords.

property synth: syside.conf.SynthOptions

Options for printing synthetic elements.

property trailing_comma: syside.conf.CommaOptions

Options for trailing comma placement.

Methods

__init__() None