mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2025-03-04 00:33: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 .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,
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue