Skip to content

Commit 29b9f5a

Browse files
Use is when comparing type of two objects (#10504)
1 parent e2842aa commit 29b9f5a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

xarray/plot/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ def _get_color_and_size(value):
11431143
# Labels are not numerical so modifying label_values is not
11441144
# possible, instead filter the array with nicely distributed
11451145
# indexes:
1146-
if type(num) == int: # noqa: E721
1146+
if type(num) is int:
11471147
loc = mpl.ticker.LinearLocator(num)
11481148
else:
11491149
raise ValueError("`num` only supports integers for non-numeric labels.")

xarray/tests/test_units.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5635,7 +5635,7 @@ def test_duck_array_ops(self):
56355635

56365636
assert_units_equal(expected, actual)
56375637
# Don't use isinstance b/c we don't want to allow subclasses through
5638-
assert type(expected.data) == type(actual.data) # noqa: E721
5638+
assert type(expected.data) is type(actual.data)
56395639

56405640

56415641
@requires_matplotlib

0 commit comments

Comments
 (0)