Skip to content

Commit

Permalink
Fix auto-formatted f-strings in columns.py (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjperkins authored Dec 7, 2023
1 parent 6bfd198 commit 2822fd7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
History
=======

X.Y.Z (YYYY-MM-DD)
------------------
* Fix auto-formatted f-strings (:pr:`301`)

0.2.19 (2023-11-13)
------------------
* Upgrade to pyarrow 14.0.1 (:pr:`299`)
Expand Down
12 changes: 6 additions & 6 deletions daskms/columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def column_metadata(column, table_proxy, table_schema, chunks, exemplar_row=0):
if ndim == 0:
raise ColumnMetadataError(
f"Scalars in column '{column}' "
"(ndim == {ndim}) are not currently handled"
f"(ndim == {ndim}) are not currently handled"
)
# Only row dimensions
elif ndim == "row":
Expand All @@ -174,9 +174,9 @@ def column_metadata(column, table_proxy, table_schema, chunks, exemplar_row=0):
except KeyError as e:
raise ColumnMetadataError(
f"'{column}' column descriptor option '{option}' "
"specifies a FixedShape but no 'shape' "
"attribute was found in the "
"column descriptor"
f"specifies a FixedShape but no 'shape' "
f"attribute was found in the "
f"column descriptor"
) from e
# Variably shaped...
else:
Expand All @@ -185,7 +185,7 @@ def column_metadata(column, table_proxy, table_schema, chunks, exemplar_row=0):
exemplar = table_proxy.getcell(column, exemplar_row).result()
except Exception as e:
raise ColumnMetadataError(
f"Unable to infer shape of " "column '{column}'"
f"Unable to infer shape of column '{column}'"
) from e

# Try figure out the shape
Expand All @@ -202,7 +202,7 @@ def column_metadata(column, table_proxy, table_schema, chunks, exemplar_row=0):
shape = (len(exemplar),)
assert dtype == object
else:
raise ColumnMetadataError(f"Unhandled exemplar type " f"'{type(exemplar)}'")
raise ColumnMetadataError(f"Unhandled exemplar type '{type(exemplar)}'")

# NOTE(sjperkins)
# -1 implies each row can be any shape whatsoever
Expand Down

0 comments on commit 2822fd7

Please sign in to comment.