root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

# Match Ruff/Black line length
ij_editor_right_margin = 120

[*.py]
indent_style = space
indent_size = 4

# Kein vertikales Ausrichten / kein "schönrechnen"
ij_python_align_collections_and_comprehensions = false
ij_python_align_multiline_imports = false
ij_python_align_multiline_parameters = false
ij_python_align_multiline_parameters_in_calls = false

# Import-Handling PyCharm AUS (Ruff übernimmt das)
ij_python_optimize_imports_sort_imports = false
ij_python_optimize_imports_sort_by_type_first = false
ij_python_optimize_imports_sort_names_in_from_imports = false
ij_python_optimize_imports_join_from_imports_with_same_source = false
ij_python_optimize_imports_always_split_from_imports = false

# Trailing Commas für stabile Zeilenumbrüche (Black/Ruff-Verhalten)
ij_python_use_trailing_comma_in_arguments_list = true
ij_python_use_trailing_comma_in_parameter_list = true
ij_python_use_trailing_comma_in_collections = true
ij_python_from_import_trailing_comma_if_multiline = true
ij_python_from_import_parentheses_force_if_multiline = false

# Umbruch-/Klammerverhalten möglichst “Black-like”
ij_python_keep_line_breaks = true
ij_python_keep_blank_lines_in_code = 1
ij_python_keep_blank_lines_in_declarations = 1
ij_python_blank_lines_after_imports = 1
ij_python_blank_lines_after_local_imports = 0
ij_python_blank_lines_around_class = 1
ij_python_blank_lines_around_method = 1
ij_python_blank_lines_around_top_level_classes_functions = 2
ij_python_blank_line_at_file_end = true

# Keine zusätzlichen Spaces in/um Klammern
ij_python_spaces_within_method_call_parentheses = false
ij_python_spaces_within_method_parentheses = false
ij_python_space_within_empty_method_call_parentheses = false
ij_python_space_within_empty_method_parentheses = false
ij_python_spaces_within_brackets = false
ij_python_spaces_within_braces = false
ij_python_space_before_method_call_parentheses = false
ij_python_space_before_method_parentheses = false
ij_python_space_before_lbracket = false

# Standard-Spacing um Operatoren (Black ist hier großzügig)
ij_python_space_after_comma = true
ij_python_space_before_comma = false
ij_python_spaces_around_assignment_operators = true
ij_python_spaces_around_additive_operators = true
ij_python_spaces_around_multiplicative_operators = true
ij_python_spaces_around_power_operator = true
ij_python_spaces_around_bitwise_operators = true
ij_python_spaces_around_equality_operators = true
ij_python_spaces_around_relational_operators = true
ij_python_spaces_around_shift_operators = true
ij_python_spaces_around_eq_in_keyword_argument = false
ij_python_spaces_around_eq_in_named_parameter = false

# Listen/Dict/Set – keine forcierten Newlines (Ruff entscheidet per Länge)
ij_python_list_wrapping = normal
ij_python_list_new_line_after_left_bracket = false
ij_python_list_new_line_before_right_bracket = false
ij_python_dict_wrapping = normal
ij_python_dict_new_line_after_left_brace = false
ij_python_dict_new_line_before_right_brace = false
ij_python_set_wrapping = normal
ij_python_set_new_line_after_left_brace = false
ij_python_set_new_line_before_right_brace = false
ij_python_tuple_wrapping = normal
ij_python_tuple_new_line_after_left_parenthesis = false
ij_python_tuple_new_line_before_right_parenthesis = false

# Funktions-/Call-Parameter: keine Sonder-Ausrichtung, keine erzwungenen Newlines
ij_python_method_parameters_wrap = normal
ij_python_method_parameters_new_line_after_left_paren = false
ij_python_method_parameters_right_paren_on_new_line = false
ij_python_call_parameters_wrap = normal
ij_python_call_parameters_new_line_after_left_paren = false
ij_python_call_parameters_right_paren_on_new_line = false

# Continuation-Indent ähnlich Black (über diese Flags am nächsten dran)
ij_python_use_continuation_indent_for_parameters = true
ij_python_use_continuation_indent_for_arguments = false
ij_python_use_continuation_indent_for_collection_and_comprehensions = false

[*.toml]
indent_style = space
indent_size = 2

[*.yml]
indent_style = space
indent_size = 2

[*.yaml]
indent_style = space
indent_size = 2
