Skip to content

Commit

Permalink
Fix NeuriteType for Python 3.12.3 (#1116)
Browse files Browse the repository at this point in the history
* Fix NeuriteType for Python 3.12.3

* Coverage
  • Loading branch information
adrien-berchet authored Apr 17, 2024
1 parent c8c1ea7 commit 4672c78
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit 4672c78

Please sign in to comment.