Skip to content

Commit

Permalink
Use collections.abc.Sequence as the alias is set to be removed
Browse files Browse the repository at this point in the history
Alias has been in place since Py 3.3, and minimum (test) version is 3.7.
  • Loading branch information
LordAro committed Nov 29, 2021
1 parent 28010df commit 9aab068
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion langkit/templates/python_api/module_py.mako
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,7 @@ class ${root_astnode_name}:
if isinstance(ast_type_or_pred, type):
sought_type = ast_type_or_pred
pred = lambda node: isinstance(node, sought_type)
elif isinstance(ast_type_or_pred, collections.Sequence):
elif isinstance(ast_type_or_pred, collections.abc.Sequence):
sought_types = ast_type_or_pred
pred = lambda node: isinstance(node, tuple(sought_types))
else:
Expand Down

0 comments on commit 9aab068

Please sign in to comment.