Skip to content

Commit

Permalink
Replace flake8-rst-docstrings and darglint with pydoclint
Browse files Browse the repository at this point in the history
As highlighted [here][github discussion], pydoclint is a much faster
alternative.

[github discussion]: cjolowicz/cookiecutter-hypermodern-python#1282 (comment)
  • Loading branch information
bruno-fs committed May 28, 2024
1 parent 346b69d commit 371a3df
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 108 deletions.
2 changes: 0 additions & 2 deletions .darglint

This file was deleted.

6 changes: 0 additions & 6 deletions .flake8

This file was deleted.

11 changes: 5 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ repos:
entry: check-yaml
language: system
types: [yaml]
- id: darglint
name: darglint
entry: darglint
language: system
types: [python]
stages: [manual]
- id: end-of-file-fixer
name: Fix End of Files
entry: end-of-file-fixer
Expand All @@ -33,6 +27,11 @@ repos:
language: system
types: [text]
stages: [commit, push, manual]
- id: pydoclint
name: pydoclint
entry: pydoclint
language: system
types: [python]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.0
hooks:
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
[![Ruff codestyle][ruff badge]][ruff project]


[pypi status]: https://pypi.org/project/retrocookie-hypermodern-python/
[read the docs]: https://retrocookie-hypermodern-python.readthedocs.io/
[tests]: https://github.com/bruno-fs/retrocookie-hypermodern-python/actions?workflow=Tests
Expand Down
3 changes: 1 addition & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,9 @@ def precommit(session: Session) -> None:
]
session.install(
"ruff",
"darglint",
"flake8-rst-docstrings",
"pre-commit",
"pre-commit-hooks",
"pydoclint",
)
session.run("pre-commit", *args)
if args and args[0] == "install":
Expand Down
114 changes: 26 additions & 88 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ click = ">=8.0.1"
[tool.poetry.dev-dependencies]
Pygments = ">=2.10.0"
coverage = { extras = ["toml"], version = ">=6.2" }
darglint = ">=1.8.1"
flake8-rst-docstrings = ">=0.2.5"
furo = ">=2021.11.12"
mypy = ">=0.930"
myst-parser = { version = ">=0.16.1" }
pre-commit = ">=2.16.0"
pre-commit-hooks = ">=4.1.0"
pydoclint = "^0.4.1"
pytest = ">=6.2.5"
ruff = ">=0.4.6"
safety = ">=1.10.3"
Expand All @@ -35,7 +35,6 @@ sphinx-autobuild = ">=2021.3.14"
sphinx-click = ">=3.0.2"
typeguard = ">=2.13.3"
xdoctest = { extras = ["colors"], version = ">=0.15.10" }
myst-parser = { version = ">=0.16.1" }

[tool.poetry.scripts]
retrocookie-hypermodern-python = "retrocookie.__main__:main"
Expand Down Expand Up @@ -106,6 +105,11 @@ extend-ignore = [
[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.pydoclint]
style = 'google'
exclude = '\.git|\.nox'
arg-type-hints-in-docstring = false

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 371a3df

Please sign in to comment.