Skip to content

Conversation

@scott-huberty
Copy link
Contributor

@scott-huberty scott-huberty commented Aug 15, 2024

closes #58

  • Removed pydocstyle from dependencies.
  • Removed pydocstyle from pre-commit.yaml
  • Removed tool.pydocstyle from pyproject.toml
  • Added tool.ruff.pydocstyle to pyproject.toml
  • added "D" to the tool.ruff.lint select option, per the ruff docs
  • ported 'D100', 'D104', 'D107' from the tool.pydocstyle add_ignore option to tool.ruff.lint.per-file-ignores
  • Unlike in tool.pydocstyle, The tool.ruff.lint.pydocstyle ignore-decorators option expects a list of str, not just a str
  • added click.group to ignore-decorators so that ruff does not raise an error for the docstring in template.commands.main.run (alternatively we could just make that docstring numpydoc compliant)
  • did NOT port the match and match_dir options from tool.pydocstyle to tool.ruff.lint.pydocstyle, because these parameters dont exist in tool.ruff.lint.pydocstyle, and I think these configurations should already be covered by the tool.ruff configurations
  • Added pre-commit to the test optional-dependencies.

scott-huberty and others added 6 commits August 15, 2024 14:51
- Remove pydocstyle from dependencies.
- Remove pydocstyle from pre-commit yaml
- Remove tool.pydocstyle from pyproject.toml
- add tool.ruff.pydocstyle
- add "D" to the  tool.ruff.lint select option, per ruff docs https://docs.astral.sh/ruff/settings/#lintpydocstyle
- move 'D100', 'D104', 'D107' from tool.pydocstyle add_ignore to tool.ruff.lint.per-file-ignores
- tool.ruff.lint.pydocstyle ignore-decorators expects a list of str, not just a str
- add click.group to ignore-decorators so that ruff does not raise an error for the docstring in template.commands.main.run
- did NOT port tool.pydocstyle match and match_dir to tool.ruff.lint.pydocstyle, because these parameters dont exist in it and I think these configurations should already be covered by the tool.ruff configurations
@github-actions github-actions bot added the 📓 doc Issue with the documentation and examples. label Aug 16, 2024
@mscheltienne mscheltienne changed the title Use Ruff implementation of PyDocStyle Use Ruff implementation of PyDocStyle and isort Aug 16, 2024
@mscheltienne
Copy link
Owner

Thanks a lot @scott-huberty
I pushed a couple more commits before merging, mainly:

  • ignore-decorators supports "specified fully-qualified decorators." -> you actually need to give the full import path, e.g. template.utils._docs.copy_doc for each decorator.
  • I removed some file exclusion to let ruff run on everything.
  • I removed isort, last time I checked, the differences with ruff implementation were too important, but this is not the case anymore! 😄
  • I pinned ruff to the latest version, 0.6.0 and above, as the PT rule set as some differences compared to 0.5.x.

@mscheltienne mscheltienne merged commit fcfc86b into mscheltienne:main Aug 16, 2024
@scott-huberty scott-huberty deleted the ruff_pydocstyle branch July 3, 2025 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📓 doc Issue with the documentation and examples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Ruff instead of Pydocstsyle for docstring checking

2 participants