Skip to content

Commit 1640e6c

Browse files
committed
Use short enum names in header.py
1 parent ce3c55c commit 1640e6c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

pygmt/datatypes/header.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,8 @@ def data_attrs(self) -> dict[str, Any]:
204204
Attributes for the data variable from the grid header.
205205
"""
206206
attrs: dict[str, Any] = {}
207-
if self.type in { # netCDF format
208-
GridID.GMT_GRID_IS_NB,
209-
GridID.GMT_GRID_IS_NS,
210-
GridID.GMT_GRID_IS_NI,
211-
GridID.GMT_GRID_IS_NF,
212-
GridID.GMT_GRID_IS_ND,
213-
}:
207+
if self.type in {GridID.NB, GridID.NS, GridID.NI, GridID.NF, GridID.ND}:
208+
# Only set the 'Conventions' attribute for netCDF.
214209
attrs["Conventions"] = "CF-1.7"
215210
attrs["title"] = self.title.decode()
216211
attrs["history"] = self.command.decode()

0 commit comments

Comments
 (0)