Skip to content

Commit

Permalink
Merge pull request #1177 from jelmer/ruff
Browse files Browse the repository at this point in the history
Use ruff support for dulwich
  • Loading branch information
jelmer authored May 10, 2023
2 parents 24a5b3a + e6ccc98 commit 06337ba
Show file tree
Hide file tree
Showing 74 changed files with 1,143 additions and 670 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,6 @@ coverage-html: coverage

apidocs:
pydoctor --intersphinx http://urllib3.readthedocs.org/en/latest/objects.inv --intersphinx http://docs.python.org/3/objects.inv --docformat=google dulwich --project-url=https://www.dulwich.io/ --project-name=dulwich

fix:
ruff check --fix .
6 changes: 2 additions & 4 deletions dulwich/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
# License, Version 2.0.
#

"""Generates tarballs for Git trees.
"""
"""Generates tarballs for Git trees."""

import posixpath
import stat
Expand All @@ -43,7 +41,7 @@ class ChunkedBytesIO:
list_of_bytestrings)
"""

def __init__(self, contents):
def __init__(self, contents) -> None:
self.contents = contents
self.pos = (0, 0)

Expand Down
5 changes: 2 additions & 3 deletions dulwich/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
# License, Version 2.0.
#

"""Bundle format support.
"""
"""Bundle format support."""

from typing import Dict, List, Optional, Sequence, Tuple, Union

Expand All @@ -35,7 +34,7 @@ class Bundle:
references: Dict[str, bytes] = {}
pack_data: Union[PackData, Sequence[bytes]] = []

def __repr__(self):
def __repr__(self) -> str:
return (f"<{type(self).__name__}(version={self.version}, "
f"capabilities={self.capabilities}, "
f"prerequisites={self.prerequisites}, "
Expand Down
2 changes: 1 addition & 1 deletion dulwich/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# License, Version 2.0.
#

"""Simple command-line interface to Dulwich>
"""Simple command-line interface to Dulwich>.
This is a very simple command-line wrapper for Dulwich. It is by
no means intended to be a full-blown Git command-line interface but just
Expand Down
Loading

0 comments on commit 06337ba

Please sign in to comment.