Skip to content

Commit 67a9552

Browse files
chore: formatting
1 parent bd170b9 commit 67a9552

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
default_stages: [pre-commit]
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v5.0.0
4+
rev: v6.0.0
55
hooks:
66
- id: end-of-file-fixer
77
stages: [pre-commit]
@@ -10,6 +10,6 @@ repos:
1010
stages: [pre-commit]
1111

1212
- repo: https://github.com/charliermarsh/ruff-pre-commit
13-
rev: 'v0.11.10'
13+
rev: 'v0.14.0'
1414
hooks:
1515
- id: ruff

databank/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(self, url: str, **kwargs):
3333
self._session = scoped_session(sessionmaker(bind=self._engine, expire_on_commit=False))
3434

3535
@contextmanager
36-
def create_session(self) -> Generator[Session, None, None]:
36+
def create_session(self) -> Generator[Session]:
3737
"""Create a new session for the current thread."""
3838
session = self._session()
3939
try:
@@ -137,7 +137,7 @@ def __init__(self, url: str, **kwargs):
137137
self._session = async_sessionmaker(bind=self._engine, expire_on_commit=False)
138138

139139
@asynccontextmanager
140-
async def acreate_session(self) -> AsyncGenerator[AsyncSession, None]:
140+
async def acreate_session(self) -> AsyncGenerator[AsyncSession]:
141141
"""Create a new session for the current thread."""
142142
session = self._session()
143143
try:
@@ -191,7 +191,7 @@ async def afetch_one(self, query: str, *, params: Mapping | None = None) -> dict
191191
return row._asdict() if row else {}
192192

193193
async def afetch_many(
194-
self, query: str, *, params: Mapping | None = None, n: int = 1
194+
self, query: str, *, params: Mapping | None = None, n: int = 1,
195195
) -> list[dict]:
196196
"""Fetch the first `n` results of the given SQL query with optional parameters.
197197

0 commit comments

Comments
 (0)