diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3851480..6337d4c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,15 +1,15 @@ repos: - repo: https://github.com/psf/black - rev: "21.9b0" + rev: 22.6.0 hooks: - id: black language_version: python3.9 - - repo: https://gitlab.com/pycqa/flake8 - rev: "3.9.0" + - repo: https://github.com/pycqa/flake8 + rev: 5.0.0 hooks: - id: flake8 - repo: https://github.com/pycqa/isort - rev: 5.9.3 + rev: 5.10.1 hooks: - id: isort name: isort (python) @@ -24,4 +24,4 @@ repos: hooks: - id: mypy additional_dependencies: - - 'strawberry-graphql==0.81.0' + - 'strawberry-graphql==0.95.1' diff --git a/setup.cfg b/setup.cfg index 80df1ea..d770937 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,21 +33,21 @@ aiogqlc = py.typed [options.extras_require] dev = - flake8==4.0.1 + flake8==5.0.0 isort==5.10.1 - black==21.9b0 - pre-commit==2.17.0 - pytest==6.2.5 + black==22.6.0 + pre-commit==2.20.0 + pytest==7.1.2 pytest-cov==3.0.0 - pytest-asyncio==0.17.2 - pytest-aiohttp==1.0.3 - tox==3.24.5 - twine==3.7.1 + pytest-asyncio==0.19.0 + pytest-aiohttp==1.0.4 + tox==3.25.1 + twine==4.0.1 strawberry-graphql==0.95.1 - mypy==0.931 + mypy==0.971 codecov==2.1.12 - mkdocs==1.2.3 - mkdocs-material==8.1.9 + mkdocs==1.2.4 + mkdocs-material==8.1.11 [flake8] max-line-length=119 diff --git a/tests/app.py b/tests/app.py index 36708e0..2f7fc8d 100644 --- a/tests/app.py +++ b/tests/app.py @@ -6,6 +6,7 @@ from strawberry.aiohttp.handlers import GraphQLWSHandler from strawberry.aiohttp.views import GraphQLView from strawberry.file_uploads import Upload +from strawberry.types import Info @strawberry.type @@ -105,21 +106,23 @@ async def todo_added(self) -> typing.AsyncGenerator[Todo, None]: yield todos[0] @strawberry.subscription - async def binary_message(self, info) -> typing.AsyncGenerator[int, None]: + async def binary_message(self, info: Info) -> typing.AsyncGenerator[int, None]: ws = info.context["ws"] yield 1 await ws.send_bytes(b"\n\0") yield 2 @strawberry.subscription - async def message_without_id(self, info) -> typing.AsyncGenerator[int, None]: + async def message_without_id(self, info: Info) -> typing.AsyncGenerator[int, None]: ws = info.context["ws"] yield 1 await ws.send_json({"type": "message-without-id"}) yield 2 @strawberry.subscription - async def message_with_invalid_type(self, info) -> typing.AsyncGenerator[int, None]: + async def message_with_invalid_type( + self, info: Info + ) -> typing.AsyncGenerator[int, None]: handler = info.context["handler"] operation_id = list(handler.tasks.keys())[0] yield 1