Skip to content

Commit

Permalink
style: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
larkee committed Jun 22, 2021
1 parent 74fe432 commit 9645251
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 1 addition & 3 deletions google/cloud/spanner_dbapi/cursor.py
Expand Up @@ -182,9 +182,7 @@ def execute(self, sql, args=None):
if ddl[-1] == ";":
ddl = ddl[:-1]
if parse_utils.classify_stmt(ddl) != parse_utils.STMT_DDL:
raise ValueError(
"Only DDL statements may be batched."
)
raise ValueError("Only DDL statements may be batched.")
ddl_statements.append(ddl)
# Only queue DDL statements if they are all correctly classified.
self.connection._ddl_statements.extend(ddl_statements)
Expand Down
11 changes: 11 additions & 0 deletions test.py
@@ -0,0 +1,11 @@
from google.cloud import spanner
from gooogle.cloud.spanner_v1 import RequestOptions

client = spanner.Client()
instance = client.instance('test-instance')
database = instance.database('test-db')

with database.snapshot() as snapshot:
results = snapshot.execute_sql("SELECT * in all_types LIMIT %s", )

database.drop()

0 comments on commit 9645251

Please sign in to comment.