Source code for babase._appintent

# Released under the MIT License. See LICENSE for details.
#
"""Provides AppIntent functionality."""
from __future__ import annotations

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    pass


[docs] class AppIntent: """Base class for high level directives given to the app."""
[docs] class AppIntentDefault(AppIntent): """Tells the app to simply run in its default mode."""
[docs] class AppIntentExec(AppIntent): """Tells the app to exec some Python code.""" def __init__(self, code: str): self.code = code
# Docs-generation hack; import some stuff that we likely only forward-declared # in our actual source code so that docs tools can find it. from typing import (Coroutine, Any, Literal, Callable, Generator, Awaitable, Sequence, Self) import asyncio from concurrent.futures import Future from pathlib import Path from enum import Enum