defnull / multipart

A fast multipart/form-data parser for python
https://multipart.readthedocs.io/
MIT License
135 stars 33 forks source link

Poor pep and spacing in general. #13

Closed theelous3 closed 5 years ago

theelous3 commented 5 years ago

The code is styled poorly. Badly in need of newlines for readability in dense text. Violates pep with operator spacing and so on. Some variable names are unclear, eg cdis ctype. Ctype being content type, but also being the colloquial name for C types makes the code ambiguous.

I recommend a pass with black

defnull commented 5 years ago

Looking at the code after many years, I do not see the issue. Pep-8 is a recommendation, not a rule book. There are many good reasons to not follow it to the word in some situations. There is not way a reader would confuse ctype with the module name in the context it is used.

I will not accept formatting-only pull requests, or pull requests that hide relevant changes in dozens of irrelevant formatting changes. Automated tools do not see context, and will enforce pep-8 even in situations where it makes the code worse.

Strict tool-assisted pep-8 might make sense for large projects with dozens of developers, so they do not accidentally re-format other peoples code all the time because of different preferences. For a small project like this, it would do more harm than good.