gauteh / lieer

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

code style guidelines #244

Closed digitalsignalperson closed 1 year ago

digitalsignalperson commented 1 year 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 1 year 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 1 year 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 1 year ago

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

digitalsignalperson commented 1 year ago

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