Skip to content

Commit

Permalink
Remove obsolete function
Browse files Browse the repository at this point in the history
Remove obsolete function and typing annotations

(cherry picked from commit 0469541)
  • Loading branch information
mike-flowers-airbnb authored and alifeee committed Oct 3, 2024
1 parent 6fc84b7 commit d7fef8f
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions gspread/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""

from typing import Any, Dict, Mapping, Optional, Union
from typing import Any, Mapping

from requests import Response

Expand Down Expand Up @@ -45,15 +45,6 @@ def __init__(self, response: Response):
self.error: Mapping[str, Any] = response.json()["error"]
self.code: int = self.error["code"]

def _extract_error(
self, response: Response
) -> Optional[Dict[str, Union[int, str]]]:
try:
errors = response.json()
return dict(errors["error"])
except (AttributeError, KeyError, ValueError):
return None

def __str__(self) -> str:
return "{}: [{}]: {}".format(
self.__class__.__name__, self.code, self.error["message"]
Expand Down

0 comments on commit d7fef8f

Please sign in to comment.