Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pydocstyle and configure ruff check for D rules #3384

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Next Next commit
add ruff config
  • Loading branch information
eracah committed Jun 7, 2024
commit ab319079d986aef4092b2d1db6f7132024a7185a
22 changes: 11 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ repos:
# types: [python]
# require_serial: true
# rev: v2.12.2
- repo: https://github.com/PyCQA/pydocstyle
hooks:
- id: pydocstyle
name: pydocstyle
entry: pydocstyle
language: python
types: [python]
exclude: "(?:tests|.ci|composer\/algorithms|composer\/datasets|composer\/models)\/.*|composer\/trainer\/activation_checkpointing.py"
additional_dependencies:
- "toml"
rev: 6.1.1
# - repo: https://github.com/PyCQA/pydocstyle
# hooks:
# - id: pydocstyle
# name: pydocstyle
# entry: pydocstyle
# language: python
# types: [python]
# exclude: "(?:tests|.ci|composer\/algorithms|composer\/datasets|composer\/models)\/.*|composer\/trainer\/activation_checkpointing.py"
# additional_dependencies:
# - "toml"
# rev: 6.1.1
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.28.0
hooks:
Expand Down
28 changes: 22 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ split_on_trailing_comma = true
[tool.ruff.lint]
select = [
"C4",
# TODO port pydocstyle
# "D", # pydocstyle
"D",
eracah marked this conversation as resolved.
Show resolved Hide resolved
"LOG",
"PERF",
"PLE",
Expand All @@ -27,7 +26,24 @@ ignore = [
"C408",
"PERF2",
"PERF4",
"D102",
"D105",
"D107",
"D401",
"D203",
"D204",
"D213",
"D215",
"D400",
"D401",
"D404",
"D406",
"D407",
"D408",
"D409",
"D413",
]

[tool.ruff]
exclude = [
"build/**",
Expand Down Expand Up @@ -1076,7 +1092,7 @@ min-public-methods=2
# "BaseException, Exception".
overgeneral-exceptions="BaseException,Exception"

[tool.pydocstyle]
convention="google"
add_ignore="D102,D105,D107,D401"
add_select="D400,D404"
# [tool.pydocstyle]
# convention="google"
# add_ignore="D102,D105,D107,D401"
# add_select="D400,D404"