Skip to content

Commit

Permalink
chore(pre-commit): [pre-commit.ci] autoupdate (#226)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pre-commit-ci[bot] authored Jul 2, 2024
1 parent 7a605a9 commit 960fb0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ repos:
- id: debug-statements
- id: double-quote-string-fixer
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.6
rev: v18.1.8
hooks:
- id: clang-format
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.9
rev: v0.5.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
6 changes: 3 additions & 3 deletions torchopt/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

try:
prefix, sep, suffix = (
subprocess.check_output(
['git', 'describe', '--abbrev=7'], # noqa: S603,S607
subprocess.check_output( # noqa: S603
['git', 'describe', '--abbrev=7'], # noqa: S607
cwd=os.path.dirname(os.path.abspath(__file__)),
stderr=subprocess.DEVNULL,
text=True,
Expand All @@ -40,7 +40,7 @@
if sep:
version_prefix, dot, version_tail = prefix.rpartition('.')
prefix = f'{version_prefix}{dot}{int(version_tail) + 1}'
__version__ = sep.join((prefix, suffix))
__version__ = f'{prefix}{sep}{suffix}'
del version_prefix, dot, version_tail
else:
__version__ = prefix
Expand Down

0 comments on commit 960fb0a

Please sign in to comment.