Classes
PageRelationshipsMixin
Mixin providing relationship checking for pages.
This mixin handles:
- Page equality checking
- Se…
PageRelationshipsMixin
Mixin providing relationship checking for pages.
This mixin handles:
- Page equality checking
- Section membership
- Ancestor/descendant relationships
Attributes
| Name | Type | Description |
|---|---|---|
source_path |
Path |
|
_section |
Section | None |
|
is_section |
bool |
Methods 4
eq
Check if two pages are equal.
eq
def eq(self, other: Page) -> bool
Check if two pages are equal.
Parameters 1
other |
Page |
Page to compare with |
Returns
True if pages are the samebool
—
in_section
Check if this page is in the given section.
in_section
def in_section(self, section: Any) -> bool
Check if this page is in the given section.
Parameters 1
section |
Any |
Section to check |
Returns
True if page is in the sectionbool
—
is_ancestor
Check if this page is an ancestor of another page.
is_ancestor
def is_ancestor(self, other: Page) -> bool
Check if this page is an ancestor of another page.
Parameters 1
other |
Page |
Page to check |
Returns
True if this page is an ancestorbool
—
is_descendant
Check if this page is a descendant of another page.
is_descendant
def is_descendant(self, other: Page) -> bool
Check if this page is a descendant of another page.
Parameters 1
other |
Page |
Page to check |
Returns
True if this page is a descendantbool
—