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

fix: remove check-docstring-first pre-commit check #1531

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

rodrigc
Copy link
Contributor

@rodrigc rodrigc commented Jan 17, 2025

This check gives false positives on attribute docstrings with warnings
such as:

  • "Multiple module docstrings (first docstring on line N)", or
  • "Module docstring appears after code (code seen on line N)"

For details, see:

pre-commit/pre-commit-hooks#159

This check gives false positives on attribute docstrings with warnings
such as:

- "Multiple module docstrings (first docstring on line N)", or
- "Module docstring appears after code (code seen on line N)"

For details, see:

pre-commit/pre-commit-hooks#159
@rodrigc
Copy link
Contributor Author

rodrigc commented Jan 17, 2025

In the discussion of pre-commit/pre-commit-hooks#159 , Several other projects chose to remove this check such as:

DanielNoord/jsonschema@8304e41
tiacsys/verylittlewire@07b2cd2

@rodrigc
Copy link
Contributor Author

rodrigc commented Jan 17, 2025

This is needed for this PR: #1530

@Fokko
Copy link
Contributor

Fokko commented Jan 17, 2025

@rodrigc Appreciate the work, thanks for taking the time! Can I suggested instead of removing the check, should we replace it with one that you suggested?

@rodrigc
Copy link
Contributor Author

rodrigc commented Jan 17, 2025

@Fokko I dont see any way around this other than removing this check. #1530 is blocked on this and @pawamoy , who is the maintainer of mkdocstrings, suggested doing this: #1530 (comment)

@Fokko
Copy link
Contributor

Fokko commented Jan 17, 2025

@rodrigc Ah, I misread the comment. Let's remove it for now then

@Fokko Fokko merged commit 59a0b37 into apache:main Jan 17, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants