gauteh / lieer

Fast email-fetching and sending and two-way tag synchronization between notmuch and GMail
http://lieer.gaute.vetsj.com
Other
494 stars 60 forks source link

code style guidelines #244

Closed digitalsignalperson closed 8 months ago

digitalsignalperson commented 11 months ago

Any thoughts on setting some style guidelines for this project and doing a pass of the repo through a code formatter?

I noticed a mix of spaces between method and parenthesis or not, which made it hard to search for e.g. all uses of the users() api:

Also there are some files with 4 space indentation, some with 2.

I'm biased to PEP8 and the familiarity of that, and totally not logical of me but I felt a little uneasy first looking at the codebase (brain goes "oh, how do I trust this code, it has 2 space indentation!!"). Also not intending this as criticism, I'm liking using this code and the project!

gauteh commented 11 months ago

Totally agree. Since this project I always use yapf or similar to format the code, then it is automatic and no need for manual maintaining or discussion.

digitalsignalperson commented 11 months ago

black could be a easy no config no decisions option too and even be hooked in to a github action https://github.com/marketplace/actions/run-black-formatter

gauteh commented 11 months ago

Happy to review a PR changing the style and adding CI.

digitalsignalperson commented 11 months ago

added https://github.com/gauteh/lieer/pull/247