Skip to content

code_formatting

Cagtay Fabry edited this page Feb 3, 2021 · 2 revisions

Code and file formatting

Python

black is used for code formatting of Python files

Markdown

Markdown files are formatted using PyCharm default Markdown presets (run with CTRL+ALT+L)

File->settings->editor->Code Style->Markdown

[{*.markdown,*.md}]
ij_markdown_force_one_space_after_blockquote_symbol = true
ij_markdown_force_one_space_after_header_symbol = true
ij_markdown_force_one_space_after_list_bullet = true
ij_markdown_force_one_space_between_words = true
ij_markdown_keep_indents_on_empty_lines = false
ij_markdown_max_lines_around_block_elements = 1
ij_markdown_max_lines_around_header = 1
ij_markdown_max_lines_between_paragraphs = 1
ij_markdown_min_lines_around_block_elements = 1
ij_markdown_min_lines_around_header = 1
ij_markdown_min_lines_between_paragraphs = 1

YAML

YAML files such as ASDF schemas are auto formatted with slight changes to the default PyCharm settings (run with CTRL+ALT+L)

File->settings->editor->Code Style->YAML

[{*.asdf,*.yaml,*.yml}]
indent_size = 2
ij_yaml_align_values_properties = do_not_align
ij_yaml_autoinsert_sequence_marker = true
ij_yaml_block_mapping_on_new_line = false
ij_yaml_indent_sequence_value = true
ij_yaml_keep_indents_on_empty_lines = false
ij_yaml_keep_line_breaks = true
ij_yaml_sequence_on_new_line = true
ij_yaml_space_before_colon = false
ij_yaml_spaces_within_braces = true
ij_yaml_spaces_within_brackets = false
Clone this wiki locally