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

darglint becomes pydoclint #3012

Open
wants to merge 32 commits into
base: develop
Choose a base branch
from

Conversation

strickvl
Copy link
Contributor

@strickvl strickvl commented Sep 13, 2024

Darglint is slow + has been archived as a project for a while.

pydoclint is a replacement, with a few extra tricks around docstring validation. Best of all, it's much faster than darglint (which we had to give its own CI runners, such was the sluggishness), so I've added this back into the linting script (where it used to live, once upon a time).

The ruff team / community are working to integrate pydoclint into ruff proper, but the issue has been open for a while and it doesn't quite yet work the way we want (despite being available on the preview feature flag).

@strickvl strickvl added internal To filter out internal PRs and issues dependencies Pull requests that update a dependency file labels Sep 13, 2024
@strickvl strickvl added the CI label Sep 13, 2024
Copy link
Contributor

coderabbitai bot commented Sep 13, 2024

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the enhancement New feature or request label Sep 13, 2024
Copy link

socket-security bot commented Sep 13, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
pypi/pydoclint@0.5.7 eval, filesystem 0 265 kB jsh9

🚮 Removed packages: pypi/darglint@1.8.1

View full report↗︎

@@ -345,7 +345,7 @@ def _delete_pod(self, pod_name: str) -> None:
pod_name: Name of the Pod to delete.

Raises:
subprocess.CalledProcessError: If the kubectl call to delete
e: If the kubectl call to delete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's quite a downgrade here in information I'd say. Any way we can add an ignore here and still have the actual error 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.

Yeah so pydoclint native doesn't actually allow these custom ignores at all, unless you use it in 'flake8 plugin mode'. We don't want to add flake8 back in, so I'd say that isn't really an option. ruff is slowly adding it in (i.e. use pydoclint as a backend to perform the checks for DOC-... error codes) but it is only available in preview model and it doesn't currently work too well. So I'd say we can either leave it this way + upgrade later when ruff support is finally stable, or we can just hold off completely until ruff support comes. I think it'd probably be a few months realistically before that's there, going off the pace of the comments etc on the GH issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI dependencies Pull requests that update a dependency file enhancement New feature or request internal To filter out internal PRs and issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants