Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
cofin committed Jan 14, 2025
1 parent 2538369 commit e643b1c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .env.testing
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ VITE_HOST=localhost
VITE_PORT=3006
VITE_HOT_RELOAD=True
VITE_DEV_MODE=True
VITE_USE_SERVER_LIFESPAN=False
VITE_USE_SERVER_LIFESPAN=False
4 changes: 1 addition & 3 deletions src/app/db/models/team_tag.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
from __future__ import annotations

from typing import Final

from advanced_alchemy.base import orm_registry
from sqlalchemy import Column, ForeignKey, Table

team_tag: Final[Table] = Table(
team_tag = Table(
"team_tag",
orm_registry.metadata,
Column("team_id", ForeignKey("team.id", ondelete="CASCADE"), primary_key=True),
Expand Down
10 changes: 5 additions & 5 deletions tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from functools import partial
from typing import TYPE_CHECKING, TypeVar, cast, overload

import anyio
from anyio import to_thread
from typing_extensions import ParamSpec

if TYPE_CHECKING:
Expand All @@ -17,11 +17,11 @@


class _ContextManagerWrapper:
def __init__(self, cm: AbstractContextManager[T]) -> None:
def __init__(self, cm: AbstractContextManager[object]) -> None:
self._cm = cm

async def __aenter__(self) -> T:
return self._cm.__enter__() # type: ignore[return-value]
async def __aenter__(self) -> object:
return self._cm.__enter__()

async def __aexit__(
self,
Expand Down Expand Up @@ -55,6 +55,6 @@ def wrap_sync(fn: Callable[P, T]) -> Callable[P, Awaitable[T]]:
return fn

async def wrapped(*args: P.args, **kwargs: P.kwargs) -> T:
return await anyio.to_thread.run_sync(partial(fn, *args, **kwargs))
return await to_thread.run_sync(partial(fn, *args, **kwargs))

return wrapped

0 comments on commit e643b1c

Please sign in to comment.