diff --git a/relay/manage.py b/relay/manage.py index 0b17712..b9a8410 100644 --- a/relay/manage.py +++ b/relay/manage.py @@ -19,7 +19,7 @@ from .application import Application from .compat import RelayConfig, RelayDatabase from .config import Config from .database import RELAY_SOFTWARE, get_database, schema -from .misc import ACTOR_FORMATS, SOFTWARE, IS_DOCKER, Message +from .misc import ACTOR_FORMATS, IS_DOCKER, Message from .views import ROUTES @@ -602,10 +602,7 @@ def cli_inbox_unfollow(ctx: click.Context, actor: str) -> None: @click.argument("inbox") @click.option("--actor", "-a", help = "Actor url for the inbox") @click.option("--followid", "-f", help = "Url for the follow activity") -@click.option("--software", "-s", - type = click.Choice(SOFTWARE), - help = "Nodeinfo software name of the instance" -) # noqa: E124 +@click.option("--software", "-s", help = "Nodeinfo software name of the instance") @click.pass_context def cli_inbox_add( ctx: click.Context, diff --git a/relay/misc.py b/relay/misc.py index fbab355..1d42407 100644 --- a/relay/misc.py +++ b/relay/misc.py @@ -17,6 +17,10 @@ if TYPE_CHECKING: T = TypeVar("T") + +IS_DOCKER = bool(os.environ.get("DOCKER_RUNNING")) +IS_WINDOWS = platform.system() == "Windows" + ResponseType = TypedDict("ResponseType", { "status": int, "headers": dict[str, Any] | None, @@ -25,9 +29,6 @@ ResponseType = TypedDict("ResponseType", { "text": str | None }) -IS_DOCKER = bool(os.environ.get("DOCKER_RUNNING")) -IS_WINDOWS = platform.system() == "Windows" - MIMETYPES = { "activity": "application/activity+json", "css": "text/css", @@ -43,17 +44,6 @@ ACTOR_FORMATS = { "pleroma": "https://{domain}/relay" } -SOFTWARE = ( - "mastodon", - "akkoma", - "pleroma", - "misskey", - "friendica", - "hubzilla", - "firefish", - "gotosocial" -) - JSON_PATHS: tuple[str, ...] = ( "/api/v1", "/actor",