Skip to content

Commit

Permalink
Reformat source code with ruff format
Browse files Browse the repository at this point in the history
PR jelmer#1312 missed a few files. This updates them to conform to the code
formatting used by the rest of the project.
  • Loading branch information
DaveLak committed May 14, 2024
1 parent c7bf165 commit 882bdfc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions dulwich/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,12 @@ def get_multivar(self, section: SectionLike, name: NameLike) -> Iterator[Value]:
raise NotImplementedError(self.get_multivar)

@overload
def get_boolean(
self, section: SectionLike, name: NameLike, default: bool
) -> bool: ...
def get_boolean(self, section: SectionLike, name: NameLike, default: bool) -> bool:
...

@overload
def get_boolean(self, section: SectionLike, name: NameLike) -> Optional[bool]: ...
def get_boolean(self, section: SectionLike, name: NameLike) -> Optional[bool]:
...

def get_boolean(
self, section: SectionLike, name: NameLike, default: Optional[bool] = None
Expand Down
6 changes: 3 additions & 3 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,9 +772,9 @@ def test_alternative_command_path(self):
)

def test_alternative_command_path_spaces(self):
self.client.alternative_paths[b"upload-pack"] = (
b"/usr/lib/git/git-upload-pack -ibla"
)
self.client.alternative_paths[
b"upload-pack"
] = b"/usr/lib/git/git-upload-pack -ibla"
self.assertEqual(
b"/usr/lib/git/git-upload-pack -ibla",
self.client._get_cmd_path(b"upload-pack"),
Expand Down
12 changes: 6 additions & 6 deletions tests/test_refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,9 @@ def test_remove_if_equals(self):
self.assertNotIn(b"refs/tags/refs-0.2", self._refs)

def test_import_refs_name(self):
self._refs[b"refs/remotes/origin/other"] = (
b"48d01bd4b77fed026b154d16493e5deab78f02ec"
)
self._refs[
b"refs/remotes/origin/other"
] = b"48d01bd4b77fed026b154d16493e5deab78f02ec"
self._refs.import_refs(
b"refs/remotes/origin",
{b"master": b"42d06bd4b77fed026b154d16493e5deab78f02ec"},
Expand All @@ -333,9 +333,9 @@ def test_import_refs_name(self):
)

def test_import_refs_name_prune(self):
self._refs[b"refs/remotes/origin/other"] = (
b"48d01bd4b77fed026b154d16493e5deab78f02ec"
)
self._refs[
b"refs/remotes/origin/other"
] = b"48d01bd4b77fed026b154d16493e5deab78f02ec"
self._refs.import_refs(
b"refs/remotes/origin",
{b"master": b"42d06bd4b77fed026b154d16493e5deab78f02ec"},
Expand Down

0 comments on commit 882bdfc

Please sign in to comment.