mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
9d4ab670d1
commit
917e2102be
24 changed files with 32 additions and 33 deletions
|
|
@ -101,7 +101,7 @@ class Store:
|
|||
os.replace(tmpfile, self.db_path)
|
||||
|
||||
@contextlib.contextmanager
|
||||
def exclusive_lock(self) -> Generator[None, None, None]:
|
||||
def exclusive_lock(self) -> Generator[None]:
|
||||
def blocked_cb() -> None: # pragma: no cover (tests are in-process)
|
||||
logger.info('Locking pre-commit directory')
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ class Store:
|
|||
def connect(
|
||||
self,
|
||||
db_path: str | None = None,
|
||||
) -> Generator[sqlite3.Connection, None, None]:
|
||||
) -> Generator[sqlite3.Connection]:
|
||||
db_path = db_path or self.db_path
|
||||
# sqlite doesn't close its fd with its contextmanager >.<
|
||||
# contextlib.closing fixes this.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue