Skip to content

Commit

Permalink
Little code quality fix
Browse files Browse the repository at this point in the history
  • Loading branch information
keell0renz committed Dec 21, 2024
1 parent 0f92a7e commit 5d584ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/scrapybara/agent/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ def query(
cmd = (
cmd
if cmd
else (str(schema.__doc__) if schema.__doc__ else "No command provided")
else (str(schema.__doc__) if schema.__doc__ else None)
)
if cmd == "No command provided":
if cmd is None:
raise ValueError(
"No command provided, please provide a 'cmd' parameter or docstring in schema class."
)
Expand Down Expand Up @@ -467,9 +467,9 @@ async def query(
cmd = (
cmd
if cmd
else (str(schema.__doc__) if schema.__doc__ else "No command provided")
else (str(schema.__doc__) if schema.__doc__ else None)
)
if cmd == "No command provided":
if cmd is None:
raise ValueError(
"No command provided, please provide a 'cmd' parameter or docstring in schema class."
)
Expand Down

0 comments on commit 5d584ff

Please sign in to comment.