Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NeuriteType for Python 3.12.3 #1116

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion neurom/core/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,12 @@ def __call__(cls, value, names=None, *, module=None, qualname=None, type=None, s
value = _int_or_tuple(value)
except ValueError:
pass
kwargs = {}
if names is not None:
# Keep default value of EnumMeta for Python>=3.12.3
kwargs["names"] = names # pragma: no cover
return super().__call__(
value, names=names, module=module, qualname=qualname, type=type, start=start
value, module=module, qualname=qualname, type=type, start=start, **kwargs
)


Expand Down
Loading