flexbe_behavior_engine icon indicating copy to clipboard operation
flexbe_behavior_engine copied to clipboard

PEP8 and git diffs in autogenerated code

Open Achllle opened this issue 5 years ago • 1 comments

My linter complains a lot for the default created behaviors and example states. There are mixed tabs and spaces (spaces should be used), ''' is used for dosctrings instead of """, linebreaks where there shouldn't be any and missing linebreaks in other places, and other PEP8 violations. The reason this is important is that it confuses git diff which shows changes which aren't really there. In some behaviors, saving without making any change causes some lines to be reordered and lines to be added and deleted elsewhere.

Achllle avatar Feb 12 '20 22:02 Achllle

I think making the generated code more deterministic is, in principle, a good idea. Will take a look at that. However, I'm not sure whether I can fully remove all of such "false positives" in a diff.

pschillinger avatar Mar 01 '20 14:03 pschillinger