kamihi.bot.utils
⚓︎
Utilities and constants for the bot module.
License
MIT
Attributes:
Name | Type | Description |
---|---|---|
COMMAND_REGEX |
Pattern
|
Regular expression pattern for validating command names. |
Functions:
Name | Description |
---|---|
parse_annotation |
Parse an annotation, extracting base type and metadata. |
parse_annotation
⚓︎
parse_annotation(ann: Any) -> tuple[type, Any]
Parse an annotation, extracting base type and metadata.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
Any
|
The annotation to parse. |
required |
Returns:
Name | Type | Description |
---|---|---|
tuple |
tuple[type, Any]
|
A tuple containing the base type and metadata. |
Source code in src/kamihi/bot/utils.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|