Page MenuHomeSoftware Heritage

cli: stop using the deprecated SWHID class
ClosedPublic

Authored by vlorentz on Mar 3 2021, 10:44 AM.

Diff Detail

Repository
rDMOD Data model
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D5189 (id=18548)

Rebasing onto 8e0119962b...

Current branch diff-target is up to date.
Changes applied before test
commit 1e924e84198a895003d6f649b8e3471cd93a7c7b
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Mar 3 10:44:27 2021 +0100

    cli: stop using the deprecated SWHID class

See https://jenkins.softwareheritage.org/job/DMOD/job/tests-on-diff/271/ for more details.

anlambert added inline comments.
swh/model/cli.py
98

Why changing the return type here ? You could avoid multiple calls to str() below by keeping the old behavior.

swh/model/cli.py
98

each function is called exactly one, and str() needs to happen either before returning or after; it doesn't make a difference.

I changed it because I prefer coercing to strings as late as possible.

anlambert added inline comments.
swh/model/cli.py
98

Ah right, I misread the code. Nevertheless, I would have keep the string conversion in the functions but that's not a big deal anyway.

This revision is now accepted and ready to land.Mar 3 2021, 1:27 PM