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

Restore pydoclint, add class docstrings #4236

Closed
wants to merge 9 commits into from

Conversation

cidrblock
Copy link
Contributor

@cidrblock cidrblock commented Jun 25, 2024

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 noqas inline for DOC. It is unecessary configuration.

@cidrblock
Copy link
Contributor Author

tox/tox/pkg failure appears to be identified upstream with work happening on it: pypa/twine#1124

@@ -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
Copy link
Member

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)

Copy link
Contributor Author

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)

cidrblock added a commit that referenced this pull request Jun 26, 2024
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
@cidrblock cidrblock closed this Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants