Skip to content

Commit

Permalink
Refactor empty string check
Browse files Browse the repository at this point in the history
  • Loading branch information
Holi0317 committed Jun 29, 2024
1 parent 2f00441 commit 85b5014
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def get_operation_name(self, cursor, args):
statement = statement.as_string(cursor)

# `statement` can be empty string. See #2643
if isinstance(statement, str) and statement != "":
if statement and isinstance(statement, str):
# Strip leading comments so we get the operation name.
return self._leading_comment_remover.sub("", statement).split()[0]

Expand Down

0 comments on commit 85b5014

Please sign in to comment.