Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ruff support for dulwich #1177

Merged
merged 2 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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