Skip to content

Commit c43b3d5

Browse files
authored
Merge pull request nexpy#252 from rayosborn:check-NXfield-arguments
Check NXfield arguments
2 parents d49e087 + 68878e1 commit c43b3d5

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/nexusformat/definitions/base_classes/NXentry.nxdl.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
208208
A small image that is representative of the entry. An example of this is a 640x480
209209
jpeg image automatically produced by a low resolution plot of the NXdata.
210210
</doc>
211-
<attribute name="type">
211+
<attribute name="type" deprecated="Use the `type` field instead">
212212
<doc>The mime type should be an ``image/*``</doc>
213213
<enumeration>
214214
<!--

src/nexusformat/definitions/base_classes/NXinstrument.nxdl.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
<group type="NXfermi_chopper" />
6161
<group type="NXfilter" />
6262
<group type="NXflipper" />
63+
<group type="NXgoniometer" />
6364
<group type="NXguide" />
6465
<group type="NXhistory"/>
6566
<group type="NXinsertion_device" />

src/nexusformat/nexus/tree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2912,7 +2912,7 @@ def __init__(self, value=None, name='unknown', shape=None, dtype=None,
29122912
if v is not None)
29132913
if attrs is None:
29142914
attrs = {}
2915-
attrs.update(kwargs)
2915+
attrs.update({k: v for k, v in kwargs.items() if v is not None})
29162916
self._attrs = AttrDict(self, attrs=attrs)
29172917
self._memfile = None
29182918
self._uncopied_data = None

0 commit comments

Comments
 (0)