Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use newer ruff style#2031

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall 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
10 changes: 5 additions & 5 deletions.pre-commit-config.yaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
repos:
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.4.1
hooks:
- id: codespell
additional_dependencies: [tomli]
exclude: ^test/fixtures/

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.0
rev: v0.11.12
hooks:
- id: ruff
- id: ruff-check
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
rev:v5.0.0
hooks:
- id: end-of-file-fixer
exclude: ^test/fixtures/|COPYING|LICENSE
Expand All@@ -33,6 +33,6 @@ repos:
- id: check-merge-conflict

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.19
rev: v0.24.1
hooks:
- id: validate-pyproject
4 changes: 2 additions & 2 deletionsgit/cmd.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -207,7 +207,7 @@ def pump_stream(
)
if stderr_handler:
error_str: Union[str, bytes] = (
"error: process killed because it timed out." f" kill_after_timeout={kill_after_timeout} seconds"
f"error: process killed because it timed out. kill_after_timeout={kill_after_timeout} seconds"
)
if not decode_streams and isinstance(p_stderr, BinaryIO):
# Assume stderr_handler needs binary input.
Expand DownExpand Up@@ -1319,7 +1319,7 @@ def communicate() -> Tuple[AnyStr, AnyStr]:
out, err = proc.communicate()
watchdog.cancel()
if kill_check.is_set():
err = 'Timeout: the command "%s" did not complete in %d' "secs." % (
err = 'Timeout: the command "%s" did not complete in %d secs.' % (
" ".join(redacted_command),
timeout,
)
Expand Down
2 changes: 1 addition & 1 deletiongit/refs/log.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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))
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 deletiongit/repo/fun.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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)}'"
f"Invalid revision spec '{rev}' - not enough parent commits to reach '{token}{int(num)}'"
) from e
# END exception handling
# END parse loop
Expand Down
2 changes: 1 addition & 1 deletiontest/test_git.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -747,7 +747,7 @@ def test_environment(self, rw_dir):

path = osp.join(rw_dir, "failing-script.sh")
with open(path, "wt") as stream:
stream.write("#!/usr/bin/env sh\n" "echo FOO\n")
stream.write("#!/usr/bin/env sh\necho FOO\n")
os.chmod(path, 0o777)

rw_repo = Repo.init(osp.join(rw_dir, "repo"))
Expand Down
2 changes: 1 addition & 1 deletiontest/test_quick_doc.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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}')
print(f"{'-' * 4 * level}| {entry.path}, {entry.type}")
if entry.type == "tree":
print_files_from_git(entry, level + 1)

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp