Skip to content

Commit

Permalink
typing fixes, ruff, update deps (#73)
Browse files Browse the repository at this point in the history
* typing fixes, ruff, update deps

* move ruff to dev group
  • Loading branch information
andriykohut authored May 28, 2023
1 parent d411608 commit cef1792
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 186 deletions.
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pretty:
lint:
poetry run black --check .
poetry run isort --check-only .
poetry run flake8 .
poetry run ruff check .
poetry run mypy .

test:
Expand Down
7 changes: 4 additions & 3 deletions esdb/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
import logging
import random
import urllib.parse
from collections.abc import AsyncIterator
from dataclasses import dataclass
from functools import cmp_to_key
from typing import AsyncContextManager, Optional
from typing import Optional

import grpc

Expand Down Expand Up @@ -230,8 +231,8 @@ def _create_channel(self, endpoint: Member.Endpoint) -> grpc.aio.Channel: # typ
f"{endpoint.address}:{endpoint.port}", credentials, self.options
)

@contextlib.asynccontextmanager # type: ignore
async def connect(self) -> AsyncContextManager[Connection]: # type: ignore
@contextlib.asynccontextmanager
async def connect(self) -> AsyncIterator[Connection]:
if self.config.dns_discover:
endpoint = await self.discover_endpoint()
else:
Expand Down
Loading

0 comments on commit cef1792

Please sign in to comment.