Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Merge branch 'fix-nodepath-python-312' of https://github.com/mgrover1…
Browse files Browse the repository at this point in the history
…/datatree into fix-nodepath-python-312
  • Loading branch information
mgrover1 committed Oct 17, 2023
2 parents 6d40234 + f42d055 commit 3a2fce6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions datatree/treenode.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class NotFoundInTreeError(ValueError):

class NodePath(PurePosixPath):
"""Represents a path from one node to another within a tree."""

def __init__(self, *pathsegments):
if sys.version_info >= (3, 12):
super().__init__(*pathsegments)
Expand All @@ -44,6 +45,7 @@ def __init__(self, *pathsegments):
)
# TODO should we also forbid suffixes to avoid node names with dots in them?


Tree = TypeVar("Tree", bound="TreeNode")


Expand Down

0 comments on commit 3a2fce6

Please sign in to comment.