Skip to content

Commit

Permalink
fix: code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
alespour committed Jul 3, 2024
1 parent 28c6fc2 commit dead56b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ def __init__(self, data_frame, point_settings, precision=DEFAULT_WRITE_PRECISION
# This column is a tag column.
if null_columns.iloc[index] or inf_columns.iloc[index]:
key_value = f"""{{
'' if {val_format} == '' or pd.isna({val_format}) or ({inf_columns.iloc[index]} and np.isinf({val_format})) else
'' if {val_format} == '' or pd.isna({val_format}) or
({inf_columns.iloc[index]} and np.isinf({val_format})) else
f',{key_format}={{str({val_format}).translate(_ESCAPE_STRING)}}'
}}"""
else:
Expand All @@ -206,7 +207,8 @@ def __init__(self, data_frame, point_settings, precision=DEFAULT_WRITE_PRECISION
suffix = 'i' if issubclass(value.type, np.integer) else ''
if null_columns.iloc[index] or inf_columns.iloc[index]:
field_value = (
f"""{{"" if pd.isna({val_format}) or ({inf_columns.iloc[index]} and np.isinf({val_format})) else f"{sep}{key_format}={{{val_format}}}{suffix}"}}"""
f"""{{"" if pd.isna({val_format}) or ({inf_columns.iloc[index]} and np.isinf({val_format})) else
f"{sep}{key_format}={{{val_format}}}{suffix}"}}"""
)
else:
field_value = f'{sep}{key_format}={{{val_format}}}{suffix}'
Expand Down

0 comments on commit dead56b

Please sign in to comment.