From 0ec12fc62e602d42b3426188ede84dcd586780dd Mon Sep 17 00:00:00 2001 From: Stefan Binder Date: Sat, 16 Mar 2024 15:56:50 +0100 Subject: [PATCH] Format code --- altair/utils/core.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/altair/utils/core.py b/altair/utils/core.py index 5e559c726..a382ac787 100644 --- a/altair/utils/core.py +++ b/altair/utils/core.py @@ -385,18 +385,21 @@ def to_list_if_array(val): # geopandas >=0.6.1 uses the dtype geometry. Continue here # otherwise it will give an error on np.issubdtype(dtype, np.integer) continue - elif dtype_name in { - "Int8", - "Int16", - "Int32", - "Int64", - "UInt8", - "UInt16", - "UInt32", - "UInt64", - "Float32", - "Float64", - }: # nullable integer datatypes (since 24.0) and nullable float datatypes (since 1.2.0) + elif ( + dtype_name + in { + "Int8", + "Int16", + "Int32", + "Int64", + "UInt8", + "UInt16", + "UInt32", + "UInt64", + "Float32", + "Float64", + } + ): # nullable integer datatypes (since 24.0) and nullable float datatypes (since 1.2.0) # https://pandas.pydata.org/pandas-docs/version/0.25/whatsnew/v0.24.0.html#optional-integer-na-support col = df[col_name].astype(object) df[col_name] = col.where(col.notnull(), None)