|
8 | 8 | from typing import Any, Callable, List, Optional, Tuple, Union |
9 | 9 |
|
10 | 10 | import requests |
11 | | - |
12 | 11 | from groundlight_openapi_client import Configuration |
13 | 12 | from groundlight_openapi_client.api.detector_groups_api import DetectorGroupsApi |
14 | 13 | from groundlight_openapi_client.api.detectors_api import DetectorsApi |
@@ -1882,7 +1881,9 @@ def list_detector_pipelines(self, detector: Union[str, Detector]) -> List[MLPipe |
1882 | 1881 | """ |
1883 | 1882 | detector_id = detector.id if isinstance(detector, Detector) else detector |
1884 | 1883 | url = f"{self.api_client.configuration.host}/v1/detectors/{detector_id}/pipelines" |
1885 | | - response = requests.get(url, headers=self.api_client._headers(), verify=self.api_client.configuration.verify_ssl) |
| 1884 | + response = requests.get( |
| 1885 | + url, headers=self.api_client._headers(), verify=self.api_client.configuration.verify_ssl |
| 1886 | + ) |
1886 | 1887 | if response.status_code == 404: |
1887 | 1888 | raise NotFoundError(f"Detector '{detector_id}' not found.") |
1888 | 1889 | response.raise_for_status() |
@@ -1910,7 +1911,9 @@ def list_priming_groups(self) -> List[PrimingGroup]: |
1910 | 1911 | :return: A list of PrimingGroup objects. |
1911 | 1912 | """ |
1912 | 1913 | url = f"{self.api_client.configuration.host}/v1/priming-groups" |
1913 | | - response = requests.get(url, headers=self.api_client._headers(), verify=self.api_client.configuration.verify_ssl) |
| 1914 | + response = requests.get( |
| 1915 | + url, headers=self.api_client._headers(), verify=self.api_client.configuration.verify_ssl |
| 1916 | + ) |
1914 | 1917 | response.raise_for_status() |
1915 | 1918 | data = response.json() |
1916 | 1919 | return [PrimingGroup(**item) for item in data.get("results", [])] |
@@ -1980,7 +1983,9 @@ def get_priming_group(self, priming_group_id: str) -> PrimingGroup: |
1980 | 1983 | :return: The PrimingGroup object. |
1981 | 1984 | """ |
1982 | 1985 | url = f"{self.api_client.configuration.host}/v1/priming-groups/{priming_group_id}" |
1983 | | - response = requests.get(url, headers=self.api_client._headers(), verify=self.api_client.configuration.verify_ssl) |
| 1986 | + response = requests.get( |
| 1987 | + url, headers=self.api_client._headers(), verify=self.api_client.configuration.verify_ssl |
| 1988 | + ) |
1984 | 1989 | if response.status_code == 404: |
1985 | 1990 | raise NotFoundError(f"PrimingGroup '{priming_group_id}' not found.") |
1986 | 1991 | response.raise_for_status() |
|
0 commit comments