Page MenuHomeSoftware Heritage

Move origin_visit_get_random to the right place in the code and fix its docstring.
ClosedPublic

Authored by vlorentz on Dec 12 2019, 7:09 PM.

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vlorentz created this revision.Dec 12 2019, 7:09 PM
vlorentz updated this revision to Diff 8650.Dec 12 2019, 7:10 PM

also fix in-mem storage

vlorentz updated this revision to Diff 8651.Dec 12 2019, 7:11 PM

fix typo

vlorentz updated this revision to Diff 8652.Dec 12 2019, 7:12 PM

fix docstring better

What's the right place?

swh/storage/storage.py
1503

might as well add its str type now (which is missing).

1506–1507

extra blank

1510

func:origin_visit_get?

ardumont added inline comments.Dec 16 2019, 9:41 AM
swh/storage/storage.py
1510

(or whatever sphinx's docstring stanza to link to another method/function is)

ardumont accepted this revision.Dec 16 2019, 9:42 AM

lgtm

please check and fix the remarks though, they are small enough ;)

This revision is now accepted and ready to land.Dec 16 2019, 9:42 AM

What's the right place?

With other origin_visit methods, instead of being in the middle of origin methods.

What's the right place?

With other origin_visit methods, instead of being in the middle of origin methods.

ok

ah yes, i remember, it started as an origin retrieval (got even named origin_get_random initially).
It became a visit retrieval in the end and i forgot to move it ;)

vlorentz updated this revision to Diff 8680.Dec 16 2019, 1:37 PM

rebase + apply @ardumont's comments

What's the right place?

With other origin_visit methods, instead of being in the middle of origin methods.

ok

ah yes, i remember, it started as an origin retrieval (got even named origin_get_random initially).
It became a visit retrieval in the end and i forgot to move it ;)

I figured as much from the position and the docstrings before this diff

vlorentz updated this revision to Diff 8682.Dec 16 2019, 1:38 PM

fix base

This revision was landed with ongoing or failed builds.Dec 16 2019, 2:09 PM
This revision was automatically updated to reflect the committed changes.