Skip to content

Commit

Permalink
style: enable W rules (deepmodeling#3793)
Browse files Browse the repository at this point in the history
Fix deepmodeling#3789.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Documentation**
- Corrected a minor formatting issue in the quick start guide for
displaying a file path.

- **Chores**
  - Added a new linting rule for warnings to improve code quality.

- **Tests**
- Improved regular expression handling in test cases by using raw string
notation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
njzjz and pre-commit-ci[bot] authored May 18, 2024
1 parent 42724ce commit 81b5949
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/getting-started/quick_start.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@
}
],
"source": [
"! cat DeePMD-kit_Tutorial/00.data/training_data/type.raw "
"! cat DeePMD-kit_Tutorial/00.data/training_data/type.raw"
]
},
{
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ docstring-code-format = true
[tool.ruff.lint]
select = [
"E", # errors
"W", # warning
"F", # pyflakes
"D", # pydocstyle
"UP", # pyupgrade
Expand Down
2 changes: 1 addition & 1 deletion source/tests/pt/model/test_fitting_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def test_consistency(self):
).to(env.DEVICE)
for name, param in my_fn.named_parameters():
matched = re.match(
"filter_layers\.networks\.(\d).layers\.(\d)\.([a-z]+)", name
r"filter_layers\.networks\.(\d).layers\.(\d)\.([a-z]+)", name
)
key = None
if matched:
Expand Down

0 comments on commit 81b5949

Please sign in to comment.