ocropus / hocr-tools

Tools for manipulating and evaluating the hOCR format for representing multi-lingual OCR results by embedding them into HTML.
Other
364 stars 79 forks source link

WIP: Reformat hocr-* code according to PEP8 #116

Closed zuphilip closed 7 years ago

zuphilip commented 7 years ago

I just used yapf -i hocr-* with yapf version 0.16.3.

zuphilip commented 7 years ago

Travis result for yapf branch:

zuphilip commented 7 years ago

This addresses #15. But we should look in details about the suggested changes and possibly deactivate some rules or not taking all changes. For example, sometimes the arguments of a function are taken on a separate lines (I guess to avoid violating the maximum line length), but these changes looks at least for me a little unfamiliar.

stweil commented 7 years ago

I added more changes suggested by pep8 to a new branch. Should we make such changes for all files, too?

zuphilip commented 7 years ago

Wow, that was a fast discussion ;-)

The fixes in your branch looks fine for me. Did you check also the setup.py file?

Should we make such changes for all files, too?

What exactly do you mean?

zuphilip commented 7 years ago

BTW should we maybe accept also #108 before the final code reformatting?

stweil commented 7 years ago

I checked all Python files with pep8, but currently only fixed the first ones in the new branch.