Closed sverley closed 3 years ago
Thanks for the heads up. As I use an IDE which auto-formats code on save, I try to keep generated code readable but I forgot a bit about PEP8 when writing code templates (and trailing spaces, among other things, slips through). I should create an automated test before fixing this.
@sverley, I guess you have the line length in mind, as it is the only recommendation that I find not respected from my experience with WhatsOpt.
I also think that limiting line length would be a good thing. Nevertheless, though I understand the limitation to 79 characters in a general context, I think that, for standard applications of WhatsOpt, such a strong limitation could hinder readability more than improve it. Yet I would support the choice to limit line lengths to 100 (or at least 88, which is the nicely argued default value of Black).
In the same vein, I would suggest to remove the coding: utf-8
lines, since Python 2 is no more supported.
... And factory classes should not inherit from object
anymore 😁
@sverley, I guess you have the line length in mind, as it is the only recommendation that I find not respected from my experience with WhatsOpt.
My bad, I had not realized that the generated code was modified by my automated runs of Black. So indeed, there is room for improvement 😅.
I have started a fix #67
I consider this is fixed by #67 and #80. Feel free to open specific issue related to generated code format.
Generated python files doesn't respect totally the PEP8 recommendations. Since WOP use a code generator, it should be great to have PEP8 compliant files in order to promote the PEP8.