olivierdalang / VectorBender

VectorBender is a QGis plugin
GNU General Public License v3.0
37 stars 15 forks source link

Updated VectorBender Coding Style #32

Open busterbeam opened 3 years ago

busterbeam commented 3 years ago

As per your request this Push Request has been been completely rewritten so as to focus as closely as possible to just code styling. I preformed a pass with black before and after editing the scripts. If this looks good I'm itching to make the logic flow better, also line 46 of vectorblenderhelp.py seems to have an error, changing from self to cls object instance keywords, wondering if this might be the reason for crashes?


Mainly focused on code styling, using black style guide. Changed from old format % specifiers to new f-literal strings. Removed u prefixing on strings as all strings are Unicode in python unless otherwise specified. Any further changes where purely cosmetic no conditional logic, variable, method or class names were changed. Mild readability improvements

olivierdalang commented 3 years ago

Thanks for that, it looks good.

Could you also add a pre-commit setup to automatize black formatting (see https://pre-commit.com/), and add a line in the readme to explain required steps before contributing (pip install pre-commit then pre-commit install) ?

About line 46 no cls is just a regular variable (with indeed a confusing name). It does not by itself cause any issue.