Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
Makes commonly used classes, functions, and decorators from `disagreement.ext` and `disagreement.ui` submodules directly accessible under the `disagreement` namespace. This change simplifies import statements for users, leading to cleaner and more concise code. Documentation and examples have been updated to reflect these new, simplified import paths.
17 lines
268 B
Python
17 lines
268 B
Python
from disagreement import loop
|
|
|
|
|
|
@loop(seconds=2.0)
|
|
async def ticker() -> None:
|
|
print("Extension tick")
|
|
|
|
|
|
def setup() -> None:
|
|
print("sample_extension setup")
|
|
ticker.start()
|
|
|
|
|
|
def teardown() -> None:
|
|
print("sample_extension teardown")
|
|
ticker.stop()
|