◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
repos:
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies: [tomli]
exclude: ^test/fixtures/

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.0
hooks:
- id: ruff
args: ["--fix"]
exclude: ^git/ext/
- id: ruff-format
Expand All @@ -23,7 +23,7 @@ repos:
exclude: ^test/fixtures/polyglot$|^git/ext/

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: end-of-file-fixer
exclude: ^test/fixtures/|COPYING|LICENSE
@@ -33,6 +33,6 @@ repos:
- id: check-merge-conflict

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.19
hooks:
- id: validate-pyproject
2 changes: 1 addition & 1 deletion git/refs/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def from_line(cls, line: bytes) -> "RefLogEntry":
elif len(fields) == 2:
info, msg = fields
else:
raise ValueError("Line must have up to two TAB-separated fields." " Got %s" % repr(line_str))
# END handle first split

oldhexsha = info[:40]
Expand Down
2 changes: 1 addition & 1 deletion git/repo/fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def rev_parse(repo: "Repo", rev: str) -> AnyGitObject:
# END end handle tag
except (IndexError, AttributeError) as e:
raise BadName(
f"Invalid revision spec '{rev}' - not enough " f"parent commits to reach '{token}{int(num)}'"
) from e
# END exception handling
# END parse loop
Expand Down
2 changes: 1 addition & 1 deletion test/test_quick_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def test_cloned_repo_object(self, local_dir):
# [15-test_cloned_repo_object]
def print_files_from_git(root, level=0):
for entry in root:
print(f'{"-" * 4 * level}| {entry.path}, {entry.type}')
if entry.type == "tree":
print_files_from_git(entry, level + 1)

Expand Down
Loading
Toggle all file notes Toggle all file annotations