DocNow / diffengine

track changes to the news, where news is anything with an RSS feed
MIT License
177 stars 30 forks source link

Python code formatter integration #66

Closed nahuelhds closed 4 years ago

nahuelhds commented 4 years ago

Hi @edsu I'm working on the first PR related to the envyaml package integration as the first step of the entire features I've been adding in my own fork.

I know you created the thread branch but I'm sure this way would be much easier as we can discuss every feature separately and that way avoiding conflicts as it's a one big file.

Anyway, one of the first things I'm thinking is this: what do you think about using a common Python formatter as a condition for the colaborators (myself in this case)?

This way every code addition, is compliant with the same way to coding. This can be done automatically by installing the code formatter it in the collaborator's own computer. E.g.: I've installed Black for formatting the code when I save the file without having to worry about that kind of stuff.

The thing here is that modifies the entire file the first time. So this would be the very first PR to integrate to the master branch, if you agree with this.

nahuelhds commented 4 years ago

image

Here it's an example of the code formatting that Black automatically changes in the code. It makes it more readable in a way it'll generate less conflicts when merging

nahuelhds commented 4 years ago

If you agree I'll make a PR only with these code formatting changes so they don't disturb the rest of the future changes

nahuelhds commented 4 years ago

Anyway, maybe you already use a formatter. Just let me know which one and I'll use the same.

edsu commented 4 years ago

Yes, I like this idea of using black. I've used it on other projects and agree that its useful when you are working with others. I'll gladly merge a PR request that adds it to the project.