mirror of
https://github.com/Ircama/epson_print_conf.git
synced 2025-05-14 23:24:43 -04:00
Fix formatting of trailing comma with black
This commit is contained in:
parent
f7d9e305d8
commit
332a6967a6
1 changed files with 3 additions and 2 deletions
|
@ -317,8 +317,9 @@ if __name__ == "__main__":
|
|||
)
|
||||
try:
|
||||
import black
|
||||
mode = black.Mode(line_length=args.line_length)
|
||||
dict_str = black.format_str(repr(printer_config), mode=mode)
|
||||
printer_config = "PRINTER_CONFIG = " + repr(printer_config)
|
||||
mode = black.Mode(line_length=args.line_length, magic_trailing_comma=False)
|
||||
dict_str = black.format_str(printer_config, mode=mode)
|
||||
except Exception:
|
||||
import pprint
|
||||
dict_str = pprint.pformat(printer_config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue