Skip to content

Commit 960fb0a

Browse files
authoredJul 2, 2024
chore(pre-commit): [pre-commit.ci] autoupdate (#226)
updates: - [github.com/pre-commit/mirrors-clang-format: v18.1.6 → v18.1.8](pre-commit/mirrors-clang-format@v18.1.6...v18.1.8) - [github.com/astral-sh/ruff-pre-commit: v0.4.9 → v0.5.0](astral-sh/ruff-pre-commit@v0.4.9...v0.5.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 7a605a9 commit 960fb0a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ repos:
2626
- id: debug-statements
2727
- id: double-quote-string-fixer
2828
- repo: https://github.com/pre-commit/mirrors-clang-format
29-
rev: v18.1.6
29+
rev: v18.1.8
3030
hooks:
3131
- id: clang-format
3232
- repo: https://github.com/astral-sh/ruff-pre-commit
33-
rev: v0.4.9
33+
rev: v0.5.0
3434
hooks:
3535
- id: ruff
3636
args: [--fix, --exit-non-zero-on-fix]

‎torchopt/version.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
try:
2727
prefix, sep, suffix = (
28-
subprocess.check_output(
29-
['git', 'describe', '--abbrev=7'], # noqa: S603,S607
28+
subprocess.check_output( # noqa: S603
29+
['git', 'describe', '--abbrev=7'], # noqa: S607
3030
cwd=os.path.dirname(os.path.abspath(__file__)),
3131
stderr=subprocess.DEVNULL,
3232
text=True,
@@ -40,7 +40,7 @@
4040
if sep:
4141
version_prefix, dot, version_tail = prefix.rpartition('.')
4242
prefix = f'{version_prefix}{dot}{int(version_tail) + 1}'
43-
__version__ = sep.join((prefix, suffix))
43+
__version__ = f'{prefix}{sep}{suffix}'
4444
del version_prefix, dot, version_tail
4545
else:
4646
__version__ = prefix

0 commit comments

Comments
 (0)