Switch to using an enum for API ID constants.

This commit is contained in:
Jennifer Taylor
2021-08-19 19:21:41 +00:00
parent 96dd9a865e
commit b92cd4f579
8 changed files with 24 additions and 19 deletions

View File

@@ -192,7 +192,7 @@ class CatalogObject(BaseObject):
else:
return self.version
def fetch_v1(self, idtype: str, ids: List[str], params: Dict[str, Any]) -> Dict[str, List[Dict[str, Any]]]:
def fetch_v1(self, idtype: APIConstants, ids: List[str], params: Dict[str, Any]) -> Dict[str, List[Dict[str, Any]]]:
# Verify IDs
if idtype != APIConstants.ID_TYPE_SERVER:
raise APIException(