Skip to content

Commit 9bdb987

Browse files
committed
Update dostrings for .child property
1 parent f62aed3 commit 9bdb987

4 files changed

Lines changed: 16 additions & 4 deletions

File tree

selectolax/lexbor.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ class LexborNode:
112112
def mem_id(self) -> int: ...
113113
@property
114114
def child(self) -> LexborNode | None:
115-
"""Alias for the first_child property."""
115+
"""Alias for the `first_child` property.
116+
117+
**Deprecated**. Please use `first_child` instead.
118+
"""
116119
...
117120
@property
118121
def first_child(self) -> LexborNode | None:

selectolax/lexbor/node.pxi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ cdef class LexborNode:
4141

4242
@property
4343
def child(self):
44-
"""Alias for the `first_child` property."""
44+
"""Alias for the `first_child` property.
45+
46+
**Deprecated**. Please use `first_child` instead.
47+
"""
4548
return self.first_child
4649

4750
@property

selectolax/modest/node.pxi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,10 @@ cdef class Node:
397397

398398
@property
399399
def child(self):
400-
"""Return the child node."""
400+
"""Alias for the `first_child` property.
401+
402+
**Deprecated**. Please use `first_child` instead.
403+
"""
401404
cdef Node node
402405
if self.node.child:
403406
node = Node.new(self.node.child, self.parser)

selectolax/parser.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,10 @@ class Node:
203203
...
204204
@property
205205
def child(self) -> Node | None:
206-
"""Return the child node."""
206+
"""Alias for the `first_child` property.
207+
208+
**Deprecated**. Please use `first_child` instead.
209+
"""
207210
...
208211
@property
209212
def parent(self) -> Node | None:

0 commit comments

Comments
 (0)