[GNC-dev] Python code formatter - black

John Ralls jralls at ceridwen.us
Mon Jul 6 23:21:40 EDT 2020


It's mostly OK, but some of the vertical space changes are excessive in particular gncinvoice_jinja.py line 213 and latex_invoices.py line 65.

I don't much care for the way it handled gncinvoice_jinja.py line 207 either: I'd prefer to move the comment above the line and if it's still too wide drop the whole call, like so:
     # something like 2004-11-01
     filename_date = 
         invoice.GetDatePosted().strftime("%Y-%m-%d")

But that's probably too much to ask of an automated tool.

Regards,
John Ralls

> On Jul 6, 2020, at 1:10 PM, c.holtermann at gmx.de wrote:
> 
> Hello folks,
> 
> I'd like to use a code formatter on the python bindings. I tried black
> [1] and liked what I saw. Would you be ok with reformatting the whole
> python bindings with it?
> I used it on two example scripts:
> https://github.com/Gnucash/gnucash/pull/736/commits/0434acbe1035ed679d23242a412c48a680ac5a07
> 
> 
> regards,
> 
> Christoph Holtermann
> 
> Links:
> ------
> [1] https://github.com/psf/black
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel



More information about the gnucash-devel mailing list