Skip to content

Commit df626d2

Browse files
Apply suggestions from code review
Co-authored-by: Toph Allen <[email protected]>
1 parent b4f418e commit df626d2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/posit/connect/tags.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def parent_tag(self) -> Tag | None:
3838
return parent
3939

4040
@property
41-
def children_tags(self) -> ChildrenTags:
41+
def child_tags(self) -> ChildTags:
4242
"""
4343
Find all child tags that are direct children of this tag.
4444
@@ -60,8 +60,6 @@ def children_tags(self) -> ChildrenTags:
6060
"""
6161
return ChildrenTags(self._ctx, self._path, parent_tag=self)
6262

63-
# TODO-barret-Q: Should this be `.descendant_tags` or `.descendants`?
64-
# TODO-barret-Q: Should this be `.find_descendants() -> list[Tag]`?
6563
@property
6664
def descendant_tags(self) -> DescendantTags:
6765
"""
@@ -80,7 +78,7 @@ def descendant_tags(self) -> DescendantTags:
8078
client = posit.connect.Client(...)
8179
8280
mytag = client.tags.find(id="TAG_ID_HERE")
83-
descendant_tags = mytag.descendant_tags().find()
81+
descendant_tags = mytag.descendant_tags.find()
8482
```
8583
"""
8684
return DescendantTags(self._ctx, parent_tag=self)
@@ -141,7 +139,7 @@ def find(self) -> list[ContentItem]:
141139
return [ContentItem(self._ctx, **result) for result in results]
142140

143141

144-
class ChildrenTags(ContextManager):
142+
class ChildTags(ContextManager):
145143
def __init__(self, ctx: Context, path: str, /, *, parent_tag: Tag) -> None:
146144
super().__init__()
147145
self._ctx = ctx

0 commit comments

Comments
 (0)