Skip to content

Commit

Permalink
Fix "Unexpected indentation error" in docs build
Browse files Browse the repository at this point in the history
And some minor coding style fixes regarding tabs and trailing
whitespaces.
  • Loading branch information
jdavid committed Nov 20, 2023
1 parent 2d7516a commit 5ec275c
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
1 change: 0 additions & 1 deletion pygit2/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,3 @@ class SubmoduleStatus(IntFlag):

WD_UNTRACKED = _pygit2.GIT_SUBMODULE_STATUS_WD_UNTRACKED
"submodule workdir contains untracked files (flag available if ignore is NONE)"

24 changes: 14 additions & 10 deletions pygit2/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ def check(self, src: FilterSource, attr_values: List[Optional[str]]):
If `Passthrough` is raised, the filter will not be applied.
Parameters:
src: The source of the filtered blob.
attr_values: The values of each attribute for the blob being
filtered. `attr_values` will be a sorted list containing
attributes in the order they were defined in
``cls.attributes``.
src: The source of the filtered blob.
attr_values: The values of each attribute for the blob being filtered.
`attr_values` will be a sorted list containing attributes in the
order they were defined in ``cls.attributes``.
"""

def write(
Expand All @@ -86,11 +87,14 @@ def write(
`write()` may be called multiple times per stream.
Parameters:
data: Input data.
src: The source of the filtered blob.
write_next: The ``write()`` method of the next filter in the chain.
Filtered output data should be written to `write_next` whenever
it is available.
data: Input data.
src: The source of the filtered blob.
write_next: The ``write()`` method of the next filter in the chain.
Filtered output data should be written to `write_next` whenever it is
available.
"""
write_next(data)

Expand Down
4 changes: 2 additions & 2 deletions pygit2/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ def fetch(self, refspecs=None, message=None, callbacks=None, prune=C.GIT_FETCH_P
* `None` (the default) to disable proxy usage
* `True` to enable automatic proxy detection
* an url to a proxy (`http://proxy.example.org:3128/`)
depth : int
Number of commits from the tip of each remote branch history to fetch.
If non-zero, the number of commits from the tip of each remote
branch history to fetch. If zero, all history is fetched.
The default is 0 (all history is fetched).
Expand Down
2 changes: 1 addition & 1 deletion pygit2/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def diff(self, a=None, b=None, cached=False, flags=GIT_DIFF_NORMAL,
def state(self) -> int:
"""Determines the state of a git repository - ie, whether an operation
(merge, cherry-pick, etc) is in progress.
Returns a GIT_REPOSITORY_STATE_* constant.
"""
return C.git_repository_state(self._repo)
Expand Down
2 changes: 1 addition & 1 deletion src/mailmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ PyDoc_STRVAR(Mailmap_from_repository__doc__,
"Mailmaps are loaded in the following order:\n"
" 1. '.mailmap' in the root of the repository's working directory, if present.\n"
" 2. The blob object identified by the 'mailmap.blob' config entry, if set.\n"
" [NOTE: 'mailmap.blob' defaults to 'HEAD:.mailmap' in bare repositories]\n"
" [NOTE: 'mailmap.blob' defaults to 'HEAD:.mailmap' in bare repositories]\n"
" 3. The path in the 'mailmap.file' config entry, if set.");
PyObject *
Mailmap_from_repository(Mailmap *dummy, PyObject *args)
Expand Down
6 changes: 2 additions & 4 deletions src/refdb_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ iterator_get_next(struct pygit2_refdb_iterator *iter)
}

static int
pygit2_refdb_iterator_next(
git_reference **out, git_reference_iterator *_iter)
pygit2_refdb_iterator_next(git_reference **out, git_reference_iterator *_iter)
{
struct pygit2_refdb_iterator *iter = (struct pygit2_refdb_iterator *)_iter;
Reference *ref = iterator_get_next(iter);
Expand All @@ -104,8 +103,7 @@ pygit2_refdb_iterator_next(
}

static int
pygit2_refdb_iterator_next_name(const char **ref_name,
git_reference_iterator *_iter)
pygit2_refdb_iterator_next_name(const char **ref_name, git_reference_iterator *_iter)
{
struct pygit2_refdb_iterator *iter = (struct pygit2_refdb_iterator *)_iter;
Reference *ref = iterator_get_next(iter);
Expand Down
1 change: 0 additions & 1 deletion test/test_submodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,3 @@ def test_submodule_reload(repo):
# Tell it to refresh its cache
sm.reload()
assert sm.url == "https://github.com/libgit2/pygit2"

0 comments on commit 5ec275c

Please sign in to comment.