From 5ca90605c743d0ab7f16e0baa30fe1e5424ea03c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 22:17:53 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.2...v0.3.2) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3d99410c..d52ea627 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: - id: sort-simple-yaml - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.2.2' + rev: 'v0.3.2' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From a0754bd43704982b0d9e046ebefed2ca9b1a7913 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 22:19:00 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- noxfile.py | 1 + src/scmrepo/asyn.py | 1 + src/scmrepo/base.py | 1 + src/scmrepo/git/backend/dulwich/asyncssh_vendor.py | 7 ++++--- src/scmrepo/git/config.py | 1 + src/scmrepo/git/credentials.py | 1 + src/scmrepo/git/lfs/client.py | 3 +-- 7 files changed, 10 insertions(+), 5 deletions(-) diff --git a/noxfile.py b/noxfile.py index 6111c61f..6f54073b 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,4 +1,5 @@ """Automation using nox.""" + import glob import os diff --git a/src/scmrepo/asyn.py b/src/scmrepo/asyn.py index 394d5b50..e52d608e 100644 --- a/src/scmrepo/asyn.py +++ b/src/scmrepo/asyn.py @@ -1,4 +1,5 @@ """DVC re-implementation of fsspec's dedicated async event loop.""" + import asyncio import os import threading diff --git a/src/scmrepo/base.py b/src/scmrepo/base.py index 5c5df7ee..a40fd8b3 100644 --- a/src/scmrepo/base.py +++ b/src/scmrepo/base.py @@ -1,4 +1,5 @@ """Manages source control systems (e.g. Git) in DVC.""" + from contextlib import AbstractContextManager diff --git a/src/scmrepo/git/backend/dulwich/asyncssh_vendor.py b/src/scmrepo/git/backend/dulwich/asyncssh_vendor.py index 45f8d88c..6dea1360 100644 --- a/src/scmrepo/git/backend/dulwich/asyncssh_vendor.py +++ b/src/scmrepo/git/backend/dulwich/asyncssh_vendor.py @@ -1,4 +1,5 @@ """asyncssh SSH vendor for Dulwich.""" + import asyncio import os from collections.abc import Coroutine, Iterator, Sequence @@ -288,9 +289,9 @@ async def _run_command( from asyncssh.auth import MSG_USERAUTH_PK_OK, _ClientPublicKeyAuth # pylint: disable=protected-access - _ClientPublicKeyAuth._packet_handlers[ - MSG_USERAUTH_PK_OK - ] = _process_public_key_ok_gh + _ClientPublicKeyAuth._packet_handlers[MSG_USERAUTH_PK_OK] = ( + _process_public_key_ok_gh + ) try: conn = await asyncssh.connect( diff --git a/src/scmrepo/git/config.py b/src/scmrepo/git/config.py index 618dac25..b4cdb813 100644 --- a/src/scmrepo/git/config.py +++ b/src/scmrepo/git/config.py @@ -1,4 +1,5 @@ """git config convenience wrapper.""" + import logging from abc import ABC, abstractmethod from collections.abc import Iterator diff --git a/src/scmrepo/git/credentials.py b/src/scmrepo/git/credentials.py index 607c8659..c217efcc 100644 --- a/src/scmrepo/git/credentials.py +++ b/src/scmrepo/git/credentials.py @@ -26,6 +26,7 @@ Currently Dulwich supports only the `get` operation """ + import locale import logging import os diff --git a/src/scmrepo/git/lfs/client.py b/src/scmrepo/git/lfs/client.py index cf9dcfd6..96b5d68d 100644 --- a/src/scmrepo/git/lfs/client.py +++ b/src/scmrepo/git/lfs/client.py @@ -91,8 +91,7 @@ def close(self): pass @abstractmethod - def _get_auth_header(self, *, upload: bool) -> dict: - ... + def _get_auth_header(self, *, upload: bool) -> dict: ... async def _batch_request( self,