Skip to content

Commit b9b6c68

Browse files
committed
refactor: simplify
1 parent 032f450 commit b9b6c68

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

parea/client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __attrs_post_init__(self):
7979
if not self.api_key:
8080
logger.warning("No API key found. Parea client will not be able to send data to the Parea API.")
8181

82-
def _get_project_uuid(self, reraise_any_exception: bool = True) -> Optional[str]:
82+
def _get_project_uuid(self) -> str:
8383
try:
8484
if not (self._project and self._project.uuid):
8585
project_api_response: CreateGetProjectResponseSchema = self._create_or_get_project(self.project_name or "default")
@@ -90,9 +90,7 @@ def _get_project_uuid(self, reraise_any_exception: bool = True) -> Optional[str]
9090
return self._project.uuid
9191
except Exception as e:
9292
logger.error(f"Parea: Error getting project UUID for project {self.project_name}: {e}")
93-
if reraise_any_exception:
94-
raise
95-
return None
93+
raise
9694

9795
def wrap_openai_client(self, client: "OpenAI", integration: Optional[str] = None) -> None:
9896
"""Only necessary for instance client with OpenAI version >= 1.0.0"""

0 commit comments

Comments
 (0)