Skip to content

Commit

Permalink
refactor naming
Browse files Browse the repository at this point in the history
  • Loading branch information
dzakharchuk committed Jan 16, 2024
1 parent 4820bbd commit a26af5e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion featureflags_client/http/managers/aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__( # noqa: PLR0913
)
self._session = aiohttp.ClientSession(base_url=url)

async def close_client(self) -> None:
async def close(self) -> None:
await self._session.close()

async def _post( # type: ignore
Expand Down
4 changes: 2 additions & 2 deletions featureflags_client/http/managers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ async def _post( # type: ignore
pass

@abstractmethod
async def close_client(self) -> None:
async def close(self) -> None:
pass

def get(self, name: str) -> Optional[Callable[[Dict], bool]]:
Expand Down Expand Up @@ -246,7 +246,7 @@ async def wait_closed(self) -> None:
if error is not None:
log.error("Flags refresh task exited with error: %r", error)

await self.close_client()
await self.close()

async def _refresh_loop(self) -> None:
log.info("Flags refresh task started")
Expand Down
2 changes: 1 addition & 1 deletion featureflags_client/http/managers/httpx.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__( # noqa: PLR0913
)
self._session = httpx.AsyncClient(base_url=url)

async def close_client(self) -> None:
async def close(self) -> None:
await self._session.aclose()

async def _post( # type: ignore
Expand Down

0 comments on commit a26af5e

Please sign in to comment.