Refactor package loaders to make the version part of BasePackageInfo
Half the loaders already had a version field in their PackageInfo class; and the version name needed to be passed almost everywhere p_info already did. This removes some duplication and inconsistencies between loaders.
Showing
- swh/loader/package/archive/loader.py 2 additions, 7 deletionsswh/loader/package/archive/loader.py
- swh/loader/package/cran/loader.py 3 additions, 9 deletionsswh/loader/package/cran/loader.py
- swh/loader/package/debian/loader.py 11 additions, 11 deletionsswh/loader/package/debian/loader.py
- swh/loader/package/debian/tests/test_debian.py 6 additions, 6 deletionsswh/loader/package/debian/tests/test_debian.py
- swh/loader/package/deposit/loader.py 8 additions, 8 deletionsswh/loader/package/deposit/loader.py
- swh/loader/package/loader.py 12 additions, 17 deletionsswh/loader/package/loader.py
- swh/loader/package/nixguix/loader.py 9 additions, 8 deletionsswh/loader/package/nixguix/loader.py
- swh/loader/package/npm/loader.py 2 additions, 7 deletionsswh/loader/package/npm/loader.py
- swh/loader/package/opam/loader.py 2 additions, 7 deletionsswh/loader/package/opam/loader.py
- swh/loader/package/pypi/loader.py 5 additions, 8 deletionsswh/loader/package/pypi/loader.py
- swh/loader/package/pypi/tests/test_pypi.py 2 additions, 1 deletionswh/loader/package/pypi/tests/test_pypi.py
- swh/loader/package/tests/test_loader.py 10 additions, 9 deletionsswh/loader/package/tests/test_loader.py
- swh/loader/package/tests/test_loader_metadata.py 3 additions, 6 deletionsswh/loader/package/tests/test_loader_metadata.py
Loading
Please register or sign in to comment