opensistemas-hub / osbrain

osBrain - A general-purpose multi-agent system module written in Python
https://osbrain.readthedocs.io/en/stable/
Apache License 2.0
175 stars 43 forks source link

Check homogeneous quoting style in source code #286

Closed Peque closed 6 years ago

Peque commented 6 years ago

Found this and thought... why not? :joy:

codecov[bot] commented 6 years ago

Codecov Report

Merging #286 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #286   +/-   ##
=======================================
  Coverage   99.15%   99.15%           
=======================================
  Files          26       26           
  Lines        3550     3550           
  Branches      256      256           
=======================================
  Hits         3520     3520           
  Misses         18       18           
  Partials       12       12
Impacted Files Coverage Δ
...ain/tests/test_agent_sync_publications_handlers.py 98.27% <ø> (ø) :arrow_up:
osbrain/tests/test_agent.py 100% <ø> (ø) :arrow_up:
osbrain/tests/test_agent_sync_publications.py 100% <ø> (ø) :arrow_up:
...sbrain/tests/test_agent_async_requests_handlers.py 96% <ø> (ø) :arrow_up:
osbrain/agent.py 97.71% <ø> (ø) :arrow_up:
osbrain/nameserver.py 99.21% <100%> (ø) :arrow_up:
osbrain/tests/test_proxy.py 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ad5e4e2...7377fa6. Read the comment docs.

ocaballeror commented 6 years ago

I'm guessing this is some sort of standard? Or is it just because you thought it looks better?

Peque commented 6 years ago

Yeah, PEP8 recommends PEP257 for docstrings, wich recommends triple double quotes. This is also what we were using (almost) everywhere.

For string quotes I do not know if there is an official recommendation. I think the recommendation is to simply stick to one or another, for consistency. As you can see we were already using single string quotes (almost) everywhere. I also think this is the de facto standard and most common approach.

Basically: we keep using the same style that we were using before, but we make it "a must". We also stick to the recommendations and more common approaches.