Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#4159)
Browse files Browse the repository at this point in the history
<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.5 →
v0.6.7](astral-sh/ruff-pre-commit@v0.6.5...v0.6.7)
- https://github.com/pylint-dev/pylint/: v3.2.7 → v3.3.0
<!--pre-commit.ci end-->

---------

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Han Wang <92130845+wanghan-iapcm@users.noreply.github.com>
Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
  • Loading branch information
3 people authored Sep 27, 2024
1 parent 94fe957 commit ad8bebe
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
exclude: ^source/3rdparty
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.5
rev: v0.6.7
hooks:
- id: ruff
args: ["--fix"]
Expand Down Expand Up @@ -146,7 +146,7 @@ repos:
exclude: .pre-commit-config.yaml|source/lmp
# customized pylint rules
- repo: https://github.com/pylint-dev/pylint/
rev: v3.2.7
rev: v3.3.0
hooks:
- id: pylint
entry: env PYTHONPATH=source/checker pylint
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -414,4 +414,4 @@ plugins = ["source.3rdparty.coverage_plugins.jit_plugin"]
[tool.pylint.'MESSAGES CONTROL']
load-plugins = "deepmd_checker"
disable = "all"
enable = "EDP01,EDP02"
enable = "E8001,E8002"
4 changes: 2 additions & 2 deletions source/checker/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DeePMD-kit customized Pylint plugin

- EDP01: Require explicit device when initializing a PyTorch tensor.
- EDP02: Require explicit dtype when initializing a NumPy array, a TensorFlow tensor, or a PyTorch tensor.
- E8001: Require explicit device when initializing a PyTorch tensor.
- E8002: Require explicit dtype when initializing a NumPy array, a TensorFlow tensor, or a PyTorch tensor.
4 changes: 2 additions & 2 deletions source/checker/deepmd_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
class DPChecker(BaseChecker):
name = "deepmd-checker"
msgs: ClassVar[dict] = {
"EDP01": (
"E8001": (
"No explicit device.",
"no-explicit-device",
"Require explicit device when initializing a PyTorch tensor.",
),
"EDP02": (
"E8002": (
"No explicit dtype.",
"no-explicit-dtype",
"Require explicit dtype when initializing a NumPy array, a TensorFlow tensor, or a PyTorch tensor.",
Expand Down

0 comments on commit ad8bebe

Please sign in to comment.