Skip to content

Commit

Permalink
remove redundant validation check
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNicholas committed Sep 16, 2024
1 parent e37fc64 commit f1b2b31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xarray/core/treenode.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ def __str__(self) -> str:

def _post_attach(self: AnyNamedNode, parent: AnyNamedNode, name: str) -> None:
"""Ensures child has name attribute corresponding to key under which it has been stored."""
_validate_name(name) # is this check redundant?
# we have already validated `name`, since it has already been set as the name of another node (the parent)
self._name = name

def _copy_node(
Expand Down

0 comments on commit f1b2b31

Please sign in to comment.