errbotio / err-backend-mattermost

GNU General Public License v3.0
41 stars 22 forks source link

Use of black for this project #46

Closed nzlosh closed 3 years ago

nzlosh commented 3 years ago

The errbot core project is formatting their code using black and I would like to know if you would accept a PR to format the mattermost backend using black for the purpose of consistency and simplifying the task of code formatting for contributors?

Vaelor commented 3 years ago

Hey @nzlosh, thanks for reaching out. Yes, I guess that reasoning makes sense, having the same codestyle for errbot and backends/plugins is a good idea! If you have one such PR, I would accept it. :-)

nzlosh commented 3 years ago

Thank you for being agreeable to use black. I know it can be a sensitive subject as people don't always see eye to eye on code style.

Vaelor commented 3 years ago

Yeah, I know since I do have my own style which differs 'a bit' from normal python - but I am open to change that with good reasoning :) Is any special config used for black or just the defaults? (haven't used that before)

nzlosh commented 3 years ago

I used the defaults settings, which means just invoking black <source_file>. As far as I know this is also how the errbot core source code is formatted. For example, I don't see any configuration options being supplied here when checking the format of the code https://github.com/errbotio/errbot/blob/f63019800cbb1d28f00cc1d1c98204e18925c3ec/tox.ini#L17