-
Notifications
You must be signed in to change notification settings - Fork 6
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
BF: Nibabel header extension access #30
Conversation
I had actually tried not to break old code and just provide better access mechanisms for common use case and lay the groundwork for writing cleaner subclasses. Does 5.3.1 fix things? It resolved issues for dcmstack. |
|
Okay, there are some indirections I don't understand because of In this case, One thing we could do is revert it to a |
I don't think this is the behaviour I'm seeing. E.g. if I run
I get
(I've truncate the first two outputs)
|
Ah, you're right. That's definitely an incorrect signature, as it would need an implementation, not just a type parameter, e.g.: class JSONExtension(NiftiExtension[dict[str, Any]]):
def _unmangle(self, raw):
return json.loads(raw.decode())
def _mangle(self, obj):
return json.dumps(obj).encode() So |
Fixes header extension access arising from nipy/nibabel#1336
@effigies You gave me plenty of warning about this, and I completely failed to test or do anything about it, but just to let you know that users reported errors like this:
Is this what you intended?