Closed NeilduToit13 closed 5 years ago
Hi @NeilduToit13,
Thanks for this. However is not a new project it has been developed for years now and I cannot integrate this pull-request it because it breaks backward compatibility.
The API has been designed to resemble as much as possible the javascript API, which at the time was pretty much the only available API for ArangoDB, and mainly the http API, hence the use of camelCase for argument name. This does not make it PEP 8 compliant, but it makes it easier to switch from one language to another, but also to use the documentation ArangoDB's http api.
pyArango started as a python2 project, and I myself still need some backward compatibility for some python2 applications. More compliance with python3 guidelines will come, but it's not a high priority.
I little PEP 8, but I am not a PEP 8 fanatic, I don't think it makes things necessarily more readable and I especially don't care about "pet peeves" whitespaces. They are based upon the English language aesthetics and I like the French " :" and " = ". I remove trailing whitespaces when I see them, but otherwise they do not bother me. My editor hides them and they are only a hnderence if you don't know how to navigate code efficiently.
However, PEP 8 does makes part of the code more readable. I will gladly merge anything that makes pyArango compliant PEP 8 compliant, as long as it does not break backward compatibility, and the one-to-one correspondence between argument names and the arguments in the http api documentation.
Cheers,
https://github.com/ArangoDB-Community/pyArango/pull/153 will give us the easily parts of this that touch many places. I may add more PRs achieving parts of this pr.
Rationale: The main reason for building a Python driver for an third-party API is, or should be, to allow Pythonic access to the service that is clear and understandable to a typical Python developer, and to simplify the process from having to use requests with custom JSON.
PEP 8 should be applied unless:
Many of the fixes in this commit also resolve internal inconsistencies (for example, highly inconsistent doc-string usage, and differing names for variables serving the equivalent function in different locations), which is a problem regardless of the coding style adopted.
Key Changes:
Changes Still Required: