The isort configuration leaves include_trailing_comma at its default, false, so isort strips the trailing commas from wrapped imports. However, yapf's split_arguments_when_comma_terminated setting depends on those commas: without them, yapf re-joins the one-per-line import layout that isort just produced, and the two formatters disagree on files such as src/python/jw/pkg/lib/App.py. Set include_trailing_comma so that isort keeps trailing commas and yapf honors them, making both tools converge on the same layout. Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.85.1 Signed-off-by: Jan Lindemann <jan@janware.com>
105 lines
1.9 KiB
TOML
105 lines
1.9 KiB
TOML
[tool.mypy]
|
|
|
|
{mypypath}
|
|
|
|
strict = true
|
|
|
|
warn_unreachable = true
|
|
|
|
enable_error_code = [
|
|
"explicit-override",
|
|
"ignore-without-code",
|
|
"possibly-undefined",
|
|
"truthy-bool",
|
|
"truthy-iterable",
|
|
"exhaustive-match",
|
|
]
|
|
|
|
[tool.isort]
|
|
|
|
multi_line_output = 3
|
|
|
|
# Keep trailing commas so that yapf's split_arguments_when_comma_terminated
|
|
# keeps the one-per-line layout that isort produces.
|
|
include_trailing_comma = true
|
|
|
|
line_length = 88
|
|
lines_after_imports = 1
|
|
lines_between_sections = 1
|
|
lines_between_types = 1
|
|
|
|
# Make sure external deps are classified above
|
|
known_third_party = [
|
|
"yaml",
|
|
]
|
|
|
|
# Define semantic/dependency layers.
|
|
sections = [
|
|
"FUTURE",
|
|
"STDLIB",
|
|
"THIRDPARTY",
|
|
"JW_BASIC",
|
|
"FIRSTPARTY",
|
|
"LOCALFOLDER",
|
|
]
|
|
|
|
known_jw_basic = [
|
|
"jw.pkg",
|
|
]
|
|
|
|
# Catch other jw.* imports not assigned to a finer section.
|
|
known_first_party = [
|
|
"jw",
|
|
]
|
|
|
|
|
|
[tool.ruff]
|
|
line-length = 88
|
|
output-format = "concise"
|
|
|
|
[tool.ruff.format]
|
|
|
|
quote-style = "single"
|
|
|
|
[tool.ruff.lint]
|
|
|
|
future-annotations = true
|
|
|
|
select = [
|
|
"F", # Pyflakes, includes F401
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"TC", # type-checking import placement rules
|
|
"FA", # future annotations rules
|
|
]
|
|
|
|
ignore = [
|
|
"E251",
|
|
]
|
|
|
|
unfixable = [
|
|
"E251",
|
|
]
|
|
|
|
[tool.yapf]
|
|
|
|
based_on_style = "pep8"
|
|
column_limit = 88
|
|
indent_width = 4
|
|
continuation_indent_width = 4
|
|
|
|
continuation_align_style = "space"
|
|
|
|
dedent_closing_brackets = true
|
|
coalesce_brackets = false
|
|
|
|
split_all_comma_separated_values = false
|
|
split_all_top_level_comma_separated_values = true
|
|
|
|
split_before_first_argument = true
|
|
split_arguments_when_comma_terminated = true
|
|
split_before_expression_after_opening_paren = true
|
|
|
|
spaces_around_default_or_named_assign = true
|
|
blank_line_before_nested_class_or_def = true
|
|
blank_lines_around_top_level_definition = 1
|