Functions
_get_attr
3
str
▼
Get href or match from tab (dict or object).
_get_attr
3
str
▼
def _get_attr(tab: dict[str, Any] | object, key: str, default: str = '') -> str
Parameters
| Name | Type | Description |
|---|---|---|
tab |
dict[str, Any] | object |
|
key |
str |
|
default |
str |
Default:''
|
Returns
str
tab_is_active
2
bool
▼
Return True when tab matches current_path.
Tab must have href. Optionally has …
tab_is_active
2
bool
▼
def tab_is_active(tab: dict | object, current_path: str) -> bool
Return True when tab matches current_path.
Tab must have href. Optionally has match: "exact" | "prefix".
Parameters
| Name | Type | Description |
|---|---|---|
tab |
dict | object |
|
current_path |
str |
Returns
bool