Skip to content

Commit 08be4e8

Browse files
chore(pre-commit): [pre-commit.ci] autoupdate (#160)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Xuehai Pan <[email protected]>
1 parent 3a4c4d1 commit 08be4e8

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

.pre-commit-config.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ repos:
2525
- id: debug-statements
2626
- id: double-quote-string-fixer
2727
- repo: https://github.com/pre-commit/mirrors-clang-format
28-
rev: v16.0.2
28+
rev: v16.0.3
2929
hooks:
3030
- id: clang-format
3131
- repo: https://github.com/charliermarsh/ruff-pre-commit
32-
rev: v0.0.263
32+
rev: v0.0.265
3333
hooks:
3434
- id: ruff
3535
args: [--fix, --exit-non-zero-on-fix]
@@ -42,7 +42,7 @@ repos:
4242
hooks:
4343
- id: black-jupyter
4444
- repo: https://github.com/asottile/pyupgrade
45-
rev: v3.3.2
45+
rev: v3.4.0
4646
hooks:
4747
- id: pyupgrade
4848
args: [--py38-plus] # sync with requires-python
@@ -69,9 +69,9 @@ repos:
6969
- repo: https://github.com/codespell-project/codespell
7070
rev: v2.2.4
7171
hooks:
72-
- id: codespell
73-
additional_dependencies: [".[toml]"]
74-
exclude: |
72+
- id: codespell
73+
additional_dependencies: [".[toml]"]
74+
exclude: |
7575
(?x)(
7676
^docs/source/spelling_wordlist.txt$|
7777
^docs/source/references.bib$

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ ruff-fix: ruff-install
138138
$(PYTHON) -m ruff check . --fix --exit-non-zero-on-fix
139139

140140
mypy: mypy-install
141-
$(PYTHON) -m mypy $(PROJECT_PATH)
141+
$(PYTHON) -m mypy $(PROJECT_PATH) --install-types --non-interactive
142142

143143
pre-commit: pre-commit-install
144144
$(PYTHON) -m pre_commit run --all-files
@@ -222,5 +222,8 @@ docker-devel:
222222

223223
docker: docker-base docker-devel
224224

225+
docker-run-base: docker-base
226+
docker run --network=host --gpus=all -v /:/host -h ubuntu -it $(PROJECT_NAME):$(COMMIT_HASH)
227+
225228
docker-run-devel: docker-devel
226229
docker run --network=host --gpus=all -v /:/host -h ubuntu -it $(PROJECT_NAME)-devel:$(COMMIT_HASH)

torchopt/optim/base.py

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
# ==============================================================================
1515
"""The base class for optimizers."""
1616

17-
# mypy: no-warn-unreachable
18-
1917
from __future__ import annotations
2018

2119
from typing import Callable, Iterable, Sequence

torchopt/utils.py

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
# ==============================================================================
1515
"""Utilities for TorchOpt."""
1616

17-
# mypy: no-warn-unused-ignores,no-warn-unreachable
18-
1917
from __future__ import annotations
2018

2119
import copy

0 commit comments

Comments
 (0)