-
Notifications
You must be signed in to change notification settings - Fork 664
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
Restore pydoclint, add class docstrings #4236
Conversation
|
@@ -71,10 +71,13 @@ repos: | |||
- id: cspell | |||
name: Spell check with cspell | |||
|
|||
- repo: https://github.com/jsh9/pydoclint | |||
rev: 0.5.1 | |||
- repo: https://github.com/pycqa/flake8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the big problematic:
- no pinning and automatic update of pydoclint itself
- flake8 maintenance "style".
- name of hook make is very hard to call it directly (a lot to type)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recognise the compromise here and am open to suggestions.
I do think it is important that what ever we do there is a corresponding extension for VsCode and feedback during development.
I wanted to bring attention to this as it is somewhat related, there is an ongoing conversation withing the ruff repo related to pydoclint. Hopefully the configuation here is short lived and ruff gets parity. astral-sh/ruff#458 (comment)
3c7377d
to
1a6fea0
Compare
3a3dde7
to
49a2163
Compare
Since flake8 has been removed, VsCode no longer provided feedback during devleopment about new docstring errors. This PR add a new task called `pydoclint` that runs pydoclint in the background. Message from pydoclint are parsed with a regex and presented in the problems tab of VsCode by the task. VsCode does not have native support fdor running a task on save, so a new extension is added to support that. The flake8 extension is removed which was an oversight in #4235 Related #4236
This reverts #4235
Depends on #4237 for the milestone fix
Flake8 is necessary as it is the only way to get realtime feedback during development using VsCode.
In this PR, the flake8 and pydoclint configurations are restored to what they were.
The latest version of pydoclint added class atribute checking in the class docstrings. Included are those docstrings such that precommit should pass the check.
This will also keep the pydoclint configuration consistent with some of the other team repos:
pytest-ansible
tox-ansible
ansible-creator
ansible-dev-environment
ansible-dev-tools
Note: an updater script was included if needed
Also: Having DOC as an external for ruff is not needed as there are no
noqa
s inline for DOC. It is unecessary configuration.