Skip to content

Commit c72ad39

Browse files
committed
fix(comment): #28701 py39 compatibility @timhoffm #28702 (comment)
1 parent ccd52a1 commit c72ad39

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/matplotlib/collections.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,13 +1268,12 @@ def __init__(
12681268

12691269
@property
12701270
def _dep_dir(self):
1271-
match self.ind_dir:
1272-
case "x":
1273-
return "y"
1274-
case "y":
1275-
return "x"
1276-
case _:
1277-
raise ValueError(f"ind_dir must be 'x' or 'y', got '{self.ind_dir}'")
1271+
if self.ind_dir == "x":
1272+
return "y"
1273+
elif self.ind_dir == "y":
1274+
return "x"
1275+
else:
1276+
raise ValueError(f"ind_dir must be 'x' or 'y', got '{self.ind_dir}'")
12781277

12791278
def set_data(
12801279
self, ind, dep1, dep2=0,

0 commit comments

Comments
 (0)