Files
maigret/tests
jichaowang02-langandGitHub ac25cd71bb Fix get_dict_ascii_tree ignoring new_line=False (#2805)
`get_dict_ascii_tree(items, prepend="", new_line=True)` immediately reassigned
`new_line` to the horizontal box-drawing glyph ("─"), shadowing the boolean
parameter. The trailing `if not new_line: text = text[1:]` — meant to strip the
leading newline — therefore tested a non-empty string (always truthy) and never
ran. Callers passing `new_line=False` (e.g. `maigret.py` printing a user's
identity data) got a stray leading blank line.

Rename the glyph local to `h_line` so the `new_line` parameter is preserved and
its strip takes effect. The tree drawing is unchanged.

Adds a regression test asserting `new_line=False` drops the leading newline
while keeping the rest of the tree identical.
2026-06-28 20:11:46 +02:00
..
2021-01-02 00:23:58 +03:00
2021-05-18 00:43:56 +03:00
2026-06-17 15:15:32 +02:00