@@ -41,6 +41,9 @@ def get(self, package_name: str) -> Set[str]:
4141
4242
4343class LaunchpadVersionAPI (VersionAPI ):
44+
45+ package_type = "deb"
46+
4447 async def load_api (self , pkg_set ):
4548 async with ClientSession (raise_for_status = True ) as session :
4649 await asyncio .gather (
@@ -75,6 +78,9 @@ async def set_api(self, pkg, session):
7578
7679
7780class PypiVersionAPI (VersionAPI ):
81+
82+ package_type = "pypi"
83+
7884 async def load_api (self , pkg_set ):
7985 async with ClientSession (raise_for_status = True ) as session :
8086 await asyncio .gather (
@@ -96,6 +102,9 @@ async def fetch(self, pkg, session):
96102
97103
98104class CratesVersionAPI (VersionAPI ):
105+
106+ package_type = "cargo"
107+
99108 async def load_api (self , pkg_set ):
100109 async with ClientSession (raise_for_status = True ) as session :
101110 await asyncio .gather (
@@ -114,6 +123,9 @@ async def fetch(self, pkg, session):
114123
115124
116125class RubyVersionAPI (VersionAPI ):
126+
127+ package_type = "gem"
128+
117129 async def load_api (self , pkg_set ):
118130 async with ClientSession (raise_for_status = True ) as session :
119131 await asyncio .gather (
@@ -135,6 +147,9 @@ async def fetch(self, pkg, session):
135147
136148
137149class NpmVersionAPI (VersionAPI ):
150+
151+ package_type = "npm"
152+
138153 async def load_api (self , pkg_set ):
139154 async with ClientSession (raise_for_status = True ) as session :
140155 await asyncio .gather (
@@ -156,6 +171,9 @@ async def fetch(self, pkg, session):
156171
157172
158173class DebianVersionAPI (VersionAPI ):
174+
175+ package_type = "deb"
176+
159177 async def load_api (self , pkg_set ):
160178 # Need to set the headers, because the Debian API upgrades
161179 # the connection to HTTP 2.0
@@ -189,6 +207,9 @@ async def set_api(self, pkg, session, retry_count=5):
189207
190208
191209class MavenVersionAPI (VersionAPI ):
210+
211+ package_type = "maven"
212+
192213 async def load_api (self , pkg_set ):
193214 async with ClientSession (raise_for_status = True ) as session :
194215 await asyncio .gather (
@@ -242,6 +263,9 @@ def extract_versions(xml_response: ET.ElementTree) -> Set[str]:
242263
243264
244265class NugetVersionAPI (VersionAPI ):
266+
267+ package_type = "nuget"
268+
245269 async def load_api (self , pkg_set ):
246270 async with ClientSession (raise_for_status = True ) as session :
247271 await asyncio .gather (
@@ -274,6 +298,9 @@ def extract_versions(resp: dict) -> Set[str]:
274298
275299
276300class ComposerVersionAPI (VersionAPI ):
301+
302+ package_type = "composer"
303+
277304 async def load_api (self , pkg_set ):
278305 async with ClientSession (raise_for_status = True ) as session :
279306 await asyncio .gather (
@@ -304,6 +331,9 @@ def extract_versions(resp: dict, pkg_name: str) -> Set[str]:
304331
305332
306333class GitHubTagsAPI (VersionAPI ):
334+
335+ package_type = "github"
336+
307337 async def load_api (self , repo_set ):
308338 async with ClientSession (raise_for_status = True ) as session :
309339 await asyncio .gather (
0 commit comments