Page MenuHomeSoftware Heritage

loader.package.deposit: Drop swh.deposit.client requirement
ClosedPublic

Authored by ardumont on Nov 20 2019, 7:04 PM.

Details

Summary

This unifies with the other package loader implementations. Also, this should
fix the current debian build failure [1] (which is the main goal here).

The real fix would be to rework properly the deposit packages/modules but i
don't feel like it's a tractable one for the current week.

[1] https://jenkins.softwareheritage.org/view/Debian%20packages/job/debian/job/packages/job/DLDBASE/job/gbp-buildpackage/40/console

Test Plan

tox

Diff Detail

Repository
rDLDBASE Generic VCS/Package Loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

swh/loader/package/__init__.py
21

I thought that since we migrated to buster (python3.7), i could avoid this but mypy plainly refused it...

swh/loader/package/__init__.py
21

Sorry for the noise, it seems ok now.

Remove missed unused import

anlambert added subscribers: zack, anlambert.

Apart some nitpicking on type annotations, looks good to me !

swh/loader/package/deposit.py
62

Based on what @zack told us during its talk on mypy, concrete types should be used for annotated returned value and abstract ones for parameters. So List[Tuple[str, Dict]] should be used here.

167

missing type annotations here

195

s/Mapping/Dict/

208

missing type annotations

swh/loader/package/tests/conftest.py
17–18

s/Mapping/Dict/

This revision is now accepted and ready to land.Nov 21 2019, 11:13 AM
swh/loader/package/deposit.py
62

Right, thx for reminding me!

  • Update missing type annotations
  • type: Declare specific type for returned values