Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
deeleeramone committed Dec 18, 2024
1 parent 78a4969 commit 1fdf45e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def connect(self) -> None: # pylint: disable=too-many-locals
self._log_thread.start()

except Exception as e: # pylint: disable=broad-except
msg = f"Unexpected error -> {e.__class__.__name__ if hasattr(e, '__class__') else e.__name__} -> {e}"
msg = f"Unexpected error -> {e.__class__.__name__ if hasattr(e, '__class__') else e} -> {e.args}"
self.logger.error(msg)
self._atexit()
raise OpenBBError(msg) from e
Expand Down Expand Up @@ -558,7 +558,7 @@ def results(self) -> list:
except Exception as e: # pylint: disable=broad-except
msg = (
"Error retrieving results:"
f" {e.__class__.__name__ if hasattr(e,'__class__') else e.__name__} -> {e}"
f" {e.__class__.__name__ if hasattr(e,'__class__') else e} -> {e.args}"
)
raise OpenBBError(msg) from e

Expand Down Expand Up @@ -857,7 +857,7 @@ def read_message_queue(
except Exception as e: # pylint: disable=broad-except
err = (
"Error while attempting to transmit from the outgoing message queue:"
f"{e.__class__.__name__ if hasattr(e, '__class__') else e.__name__} -> {e} -> {message}"
f"{e.__class__.__name__ if hasattr(e, '__class__') else e} -> {e.args} -> {message}"
)
client.logger.error(err)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def write_to_db(self, message) -> None:
f" {e.__class__.__name__ if hasattr(e, '__class__') else e} -> {e.args}"
)
self.logger.error(msg)
self._exception = e
self._exception = e # type: ignore
raise OpenBBError(msg) from e

async def _fetch_all(self, limit: Optional[int] = None) -> list:
Expand Down Expand Up @@ -294,7 +294,7 @@ def fetch_all(self, limit: Optional[int] = None) -> list:
f" {e.__class__.__name__ if hasattr(e, '__class__') else e} -> {e.args}"
)
self.logger.error(msg)
self._exception = e
self._exception = e # type: ignore
raise OpenBBError(msg) from e

async def _query_db(self, sql) -> list:
Expand Down

0 comments on commit 1fdf45e

Please sign in to comment.