From 9ec4d60615d6f7775c1d07697da8d422beac13bc Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Wed, 19 Jun 2024 15:18:28 +0100 Subject: [PATCH] typing fixes --- pyproject.toml | 2 +- src/textual_serve/app_service.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 488a0fc..9c32b4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "textual-serve" -version = "1.0.0" +version = "1.0.1" description = "Turn your Textual TUIs in to web applications" authors = [ { name = "Will McGugan", email = "will@textualize.io" } diff --git a/src/textual_serve/app_service.py b/src/textual_serve/app_service.py index afc28de..a553a95 100644 --- a/src/textual_serve/app_service.py +++ b/src/textual_serve/app_service.py @@ -1,8 +1,10 @@ +from __future__ import annotations + import asyncio import io import json import os -from typing import Awaitable, Callable, Literal, TypeAlias +from typing import Awaitable, Callable, Literal from asyncio.subprocess import Process import logging @@ -12,8 +14,6 @@ log = logging.getLogger("textual-serve") -Meta: TypeAlias = "dict[str, str | None | int | bool]" - @rich.repr.auto class AppService: @@ -121,7 +121,7 @@ async def send_bytes(self, data: bytes) -> bool: return False return True - async def send_meta(self, data: Meta) -> bool: + async def send_meta(self, data: dict[str, str | None | int | bool]) -> bool: """Send meta information to process. Args: