Jaymon / pout

Python pretty print on steroids
MIT License
29 stars 0 forks source link

Added .editorconfig #54

Closed KOLANICH closed 4 years ago

KOLANICH commented 4 years ago

It setups the text editor to use the conventions used in a repo. For example, if I used tabs in a PR, you would have said that you won't merge the code using tabs. But the global setting of the editor I use is is to use tabs. And per-project settings are done via .editorconfig files (they are not editor-specific and supported by a lot of editors and IDEs).

Jaymon commented 4 years ago

I'm going to think about this one for a bit, the settings are standard PEP 8 python settings so I'm not sure there are many python people who don't already have their python environments configured this way.

I also use vim which doesn't support these files without a plugin.

KOLANICH commented 4 years ago

I also use vim which doesn't support these files without a plugin.

Most of IDEs support the thing via a plugin.

the settings are standard PEP 8 python settings so I'm not sure there are many python people who don't already have their python environments configured this way.

PEP 8 is just a holy cow of python community that IMHO harmful and should be avoided.

Jaymon commented 4 years ago

I'm interested to hear more about what you think is harmful about PEP 8. I'm a fan of conventions and usually lean on the side of conventions over configuration.

In fact, the lack of universal accepted conventions and libraries is one of the things I find maddening about Javascript, it drives me nuts that js projects I work on have like 25 dot files with different configurations in them.

KOLANICH commented 4 years ago

I'm interested to hear more about what you think is harmful about PEP 8.

Jaymon commented 4 years ago

I was a spaces person before I learned python so it never really bothered me, I can see the file size argument, and even the other argument of tabs allow people to format the code in the way they see fit (one can have tab at 4 spaces, another at 8 spaces and they can both be happy) but since I came from a spaces for everything background, I just went with the flow.

Agree completely on the line length, I never paid much attention to line lengths, and they actually loosened it to 120 characters if needed in later peps (if I remember correctly) because it's such an outdated restriction.

I might be loose on the imports also, I will import things from the same module on the same line and not pay any attention to it.

I don't run a pep checker or anything like that because I would probably get annoyed, but I follow the spirit of pep because it makes it easy to jump into my code or any one else's code and more or less know how everything is laid out, and I like that, because coming from java, C, and php it was a crapshoot when you jumped into someone else's code.