From c92437c624e000edb3d09c66facad62f052409fd Mon Sep 17 00:00:00 2001 From: Daan de Ruiter <30779179+drderuiter@users.noreply.github.com> Date: Thu, 13 May 2021 11:06:54 +0200 Subject: [PATCH] Further specify allowed_methods type hint --- aiohttp_pydantic/view.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aiohttp_pydantic/view.py b/aiohttp_pydantic/view.py index 42b3664..a4f1c59 100644 --- a/aiohttp_pydantic/view.py +++ b/aiohttp_pydantic/view.py @@ -1,6 +1,6 @@ from functools import update_wrapper from inspect import iscoroutinefunction -from typing import Any, Callable, Generator, Iterable +from typing import Any, Callable, Generator, Iterable, Set from aiohttp.abc import AbstractView from aiohttp.hdrs import METH_ALL @@ -25,7 +25,7 @@ class PydanticView(AbstractView): """ # Allowed HTTP methods; overridden when subclassed. - allowed_methods: set = {} + allowed_methods: Set[str] = {} async def _iter(self) -> StreamResponse: if (method_name := self.request.method) not in self.allowed_methods: