inveniosoftware / dojson

Simple pythonic JSON to JSON converter.
https://dojson.readthedocs.io
Other
10 stars 29 forks source link

utils: GroupableOrderedDict.__repr__() #163

Closed kaplun closed 8 years ago

kaplun commented 8 years ago
utils: GroupableOrderedDict.__repr__()

* FIX Implements GroupableOrderedDict.__repr__()
  allowing for having
  >>> assert eval(repr(god)) == god
  (closes #162)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
jirikuncar commented 8 years ago

@kaplun please format the commit message so it is well rendered in release notes. You can check the result by running kwalitee prepare release v1.2.1.. (and try to render the rst).

kaplun commented 8 years ago

What about this?

jirikuncar commented 8 years ago
kaplun commented 8 years ago

:boom:

jirikuncar commented 8 years ago

@kaplun is there any particular reason why (closes #162) in on new line?

kaplun commented 8 years ago

@jirikuncar is there a particular reason why you are asking it? Would that really make a sensible difference?

The reason is that in the last 5 years we were putting it always on new line.

Anyway, PR is about to be refreshed with the correct newlines.

tiborsimko commented 8 years ago

The reason is that in the last 5 years we were putting it always on new line.

It's only cosmetics, but it's not so clear cut as you put it -- e.g. see the invenio repository history that suggests that it is actually the other style that prevails:

$ git log | grep -c '(closes #[0-9][0-9]'
849
$ git log | grep -c '^      (closes #[0-9][0-9]'
332
$ git log | grep -c '(addresses #[0-9][0-9]'
322
$ git log | grep -c '^      (addresses #[0-9][0-9]'
114

(not even counting the situation where the directive ends up on the next line "naturally indented")

FWIW I personally use Emacs git commit mode and fill-paragraph that takes care of new lines automatically.