Skip to content

Commit 545d0eb

Browse files
Drop f-strings for compatibility
1 parent c372917 commit 545d0eb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

pybigquery/sqlalchemy_bigquery.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def _split_table_name(full_table_name):
364364
elif len(table_name_split) == 3:
365365
project, dataset, table_name = table_name_split
366366
else:
367-
raise ValueError(f"Did not understand table_name: {full_table_name}")
367+
raise ValueError("Did not understand table_name: {}".format(full_table_name))
368368

369369
return (project, dataset, table_name)
370370

@@ -386,14 +386,13 @@ def _table_reference(self, provided_schema_name, provided_table_name,
386386
project_id_from_schema = provided_schema_name_split[0]
387387
dataset_id_from_schema = provided_schema_name_split[1]
388388
else:
389-
raise ValueError(f"Did not understand schema: {provided_schema_name}")
390-
# TODO: Get a test for an else statement here
389+
raise ValueError("Did not understand schema: {}".format(provided_schema_name))
391390
if (dataset_id_from_schema and dataset_id_from_table and
392391
dataset_id_from_schema != dataset_id_from_table):
393-
raise ValueError(f"dataset_id specified in schema and table_name disagree: got {dataset_id_from_schema} in schema, and {dataset_id_from_table} in table_name")
392+
raise ValueError("dataset_id specified in schema and table_name disagree: got {} in schema, and {} in table_name".format(dataset_id_from_schema, dataset_id_from_table))
394393
if (project_id_from_schema and project_id_from_table and
395394
project_id_from_schema != project_id_from_table):
396-
raise ValueError(f"project_id specified in schema and table_name disagree: got {project_id_from_schema} in schema, and {project_id_from_table} in table_name")
395+
raise ValueError("project_id specified in schema and table_name disagree: got {} in schema, and {} in table_name".format(project_id_from_schema, project_id_from_table))
397396
project_id = project_id_from_schema or project_id_from_table or client_project
398397
dataset_id = dataset_id_from_schema or dataset_id_from_table or self.dataset_id
399398

0 commit comments

Comments
 (0)