Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/peplum/peps/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def _get(self, url: str) -> Response:
The response.

Raises:
RequestError: If there was some sort of error.
API.RequestError: If there was some sort of error.
"""
try:
response = await self._client.get(url, headers={"user-agent": self.AGENT})
Expand All @@ -70,7 +70,7 @@ async def get_peps(self) -> dict[int, dict[str, Any]]:
The PEP JSON data.

Raises:
RequestError: If there was a problem getting the PEPS.
API.RequestError: If there was a problem getting the PEPS.
"""
if isinstance(
raw_data := (
Expand All @@ -79,7 +79,7 @@ async def get_peps(self) -> dict[int, dict[str, Any]]:
dict,
):
return raw_data
raise RequestError("Unexpected data received from the PEP API")
raise self.RequestError("Unexpected data received from the PEP API")

@staticmethod
def pep_file(pep: int) -> Path:
Expand Down