mirror of
https://github.com/Ircama/epson_print_conf.git
synced 2025-05-15 23:54:39 -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:
|
try:
|
||||||
import black
|
import black
|
||||||
mode = black.Mode(line_length=args.line_length)
|
printer_config = "PRINTER_CONFIG = " + repr(printer_config)
|
||||||
dict_str = black.format_str(repr(printer_config), mode=mode)
|
mode = black.Mode(line_length=args.line_length, magic_trailing_comma=False)
|
||||||
|
dict_str = black.format_str(printer_config, mode=mode)
|
||||||
except Exception:
|
except Exception:
|
||||||
import pprint
|
import pprint
|
||||||
dict_str = pprint.pformat(printer_config)
|
dict_str = pprint.pformat(printer_config)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue