Skip to content

Commit

Permalink
adding review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
HGWright committed Nov 9, 2023
1 parent 247feb1 commit 724d05f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions lib/iris/coords.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,8 +864,8 @@ def xml_element(self, doc):
element.setAttribute(
"climatological", str(self.climatological)
)
if self.guess_coord:
element.setAttribute("guess_coord", str(self.guess_coord))
if self.ignore_axis:
element.setAttribute("ignore_axis", str(self.ignore_axis))
if self.attributes:
attributes_element = doc.createElement("attributes")
for name in sorted(self.attributes.keys()):
Expand Down Expand Up @@ -1782,7 +1782,7 @@ def ignore_axis(self):
@ignore_axis.setter
def ignore_axis(self, value):
if not isinstance(value, bool):
emsg = "Ignore_axis can only be set to True or False"
emsg = "'ignore_axis' can only be set to 'True' or 'False'"
raise ValueError(emsg)
self._ignore_axis = value

Expand Down Expand Up @@ -2732,9 +2732,6 @@ def __init__(
Will set to True when a climatological time axis is loaded
from NetCDF.
Always False if no bounds exist.
* guess_coord (bool):
When True: guess_coord will guess the coord, when False it won't.
"""
# Configure the metadata manager.
self._metadata_manager = metadata_manager_factory(DimCoordMetadata)
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def guess_coord_axis(coord):

axis = None

if coord.ignore_axis is True:
if hasattr(coord, "ignore_axis") and coord.ignore_axis is True:
return axis

elif coord.standard_name in (
Expand Down

0 comments on commit 724d05f

Please sign in to comment.