mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2025-03-04 08:43:58 +00:00
remove unnecessary SOFTWARE const
This commit is contained in:
parent
338fd26688
commit
f41b24406f
2 changed files with 6 additions and 19 deletions
|
@ -19,7 +19,7 @@ from .application import Application
|
||||||
from .compat import RelayConfig, RelayDatabase
|
from .compat import RelayConfig, RelayDatabase
|
||||||
from .config import Config
|
from .config import Config
|
||||||
from .database import RELAY_SOFTWARE, get_database, schema
|
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
|
from .views import ROUTES
|
||||||
|
|
||||||
|
|
||||||
|
@ -602,10 +602,7 @@ def cli_inbox_unfollow(ctx: click.Context, actor: str) -> None:
|
||||||
@click.argument("inbox")
|
@click.argument("inbox")
|
||||||
@click.option("--actor", "-a", help = "Actor url for the inbox")
|
@click.option("--actor", "-a", help = "Actor url for the inbox")
|
||||||
@click.option("--followid", "-f", help = "Url for the follow activity")
|
@click.option("--followid", "-f", help = "Url for the follow activity")
|
||||||
@click.option("--software", "-s",
|
@click.option("--software", "-s", help = "Nodeinfo software name of the instance")
|
||||||
type = click.Choice(SOFTWARE),
|
|
||||||
help = "Nodeinfo software name of the instance"
|
|
||||||
) # noqa: E124
|
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def cli_inbox_add(
|
def cli_inbox_add(
|
||||||
ctx: click.Context,
|
ctx: click.Context,
|
||||||
|
|
|
@ -17,6 +17,10 @@ if TYPE_CHECKING:
|
||||||
|
|
||||||
|
|
||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
|
|
||||||
|
IS_DOCKER = bool(os.environ.get("DOCKER_RUNNING"))
|
||||||
|
IS_WINDOWS = platform.system() == "Windows"
|
||||||
|
|
||||||
ResponseType = TypedDict("ResponseType", {
|
ResponseType = TypedDict("ResponseType", {
|
||||||
"status": int,
|
"status": int,
|
||||||
"headers": dict[str, Any] | None,
|
"headers": dict[str, Any] | None,
|
||||||
|
@ -25,9 +29,6 @@ ResponseType = TypedDict("ResponseType", {
|
||||||
"text": str | None
|
"text": str | None
|
||||||
})
|
})
|
||||||
|
|
||||||
IS_DOCKER = bool(os.environ.get("DOCKER_RUNNING"))
|
|
||||||
IS_WINDOWS = platform.system() == "Windows"
|
|
||||||
|
|
||||||
MIMETYPES = {
|
MIMETYPES = {
|
||||||
"activity": "application/activity+json",
|
"activity": "application/activity+json",
|
||||||
"css": "text/css",
|
"css": "text/css",
|
||||||
|
@ -43,17 +44,6 @@ ACTOR_FORMATS = {
|
||||||
"pleroma": "https://{domain}/relay"
|
"pleroma": "https://{domain}/relay"
|
||||||
}
|
}
|
||||||
|
|
||||||
SOFTWARE = (
|
|
||||||
"mastodon",
|
|
||||||
"akkoma",
|
|
||||||
"pleroma",
|
|
||||||
"misskey",
|
|
||||||
"friendica",
|
|
||||||
"hubzilla",
|
|
||||||
"firefish",
|
|
||||||
"gotosocial"
|
|
||||||
)
|
|
||||||
|
|
||||||
JSON_PATHS: tuple[str, ...] = (
|
JSON_PATHS: tuple[str, ...] = (
|
||||||
"/api/v1",
|
"/api/v1",
|
||||||
"/actor",
|
"/actor",
|
||||||
|
|
Loading…
Reference in a new issue