From 21ec529987d10e0010badd37f8da3274167d436f Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 18 May 2022 07:43:53 +0800 Subject: Run everything through 'black' That way people who use it won't be deterred, while it unifies style everywhere. --- git/db.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'git/db.py') diff --git a/git/db.py b/git/db.py index 3a7adc7d..a119f4ea 100644 --- a/git/db.py +++ b/git/db.py @@ -1,9 +1,6 @@ """Module with our own gitdb implementation - it uses the git command""" from git.util import bin_to_hex, hex_to_bin -from gitdb.base import ( - OInfo, - OStream -) +from gitdb.base import OInfo, OStream from gitdb.db import GitDB # @UnusedImport from gitdb.db import LooseObjectDB @@ -21,7 +18,7 @@ if TYPE_CHECKING: # -------------------------------------------------------- -__all__ = ('GitCmdObjectDB', 'GitDB') +__all__ = ("GitCmdObjectDB", "GitDB") class GitCmdObjectDB(LooseObjectDB): @@ -34,7 +31,7 @@ class GitCmdObjectDB(LooseObjectDB): have packs and the other implementations """ - def __init__(self, root_path: PathLike, git: 'Git') -> None: + def __init__(self, root_path: PathLike, git: "Git") -> None: """Initialize this instance with the root and a git command""" super(GitCmdObjectDB, self).__init__(root_path) self._git = git @@ -45,7 +42,9 @@ class GitCmdObjectDB(LooseObjectDB): def stream(self, binsha: bytes) -> OStream: """For now, all lookup is done by git itself""" - hexsha, typename, size, stream = self._git.stream_object_data(bin_to_hex(binsha)) + hexsha, typename, size, stream = self._git.stream_object_data( + bin_to_hex(binsha) + ) return OStream(hex_to_bin(hexsha), typename, size, stream) # { Interface @@ -63,4 +62,4 @@ class GitCmdObjectDB(LooseObjectDB): raise BadObject(partial_hexsha) from e # END handle exceptions - #} END interface + # } END interface -- cgit v1.2.1