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

Show additional information when a hook fails #3190

Conversation

helly25
Copy link

@helly25 helly25 commented Apr 25, 2024

Possible implementation for #3189

When run is called with -v, then show hook.description if available.

When developers run the pre-commit, they don't always understand what to or where to find more information. The hook description field is already present and often used to provide more descriptive information. For brevity this is not shown in normal cases, but this PR changes the tool behavior to show the description in verbose mode (-v). So most users won't see any difference but this can easily be enabled for people who want it.

Alternatives considered:

  • Always show the description: Some people may not like this though as it can be spammy.
  • Provide a new field: Possible but seems to be just more work with description already present and not otherwise used.
  • Show the repo link. This is at the wrong level and has a slightly different purpose. Though description can just be set to the same url where that is correct.

…able.

When developers run the pre-commit, they don't always understand what to or where to find more information. The hook description field is already present and often used to provide more descriptive information. For brevity this is not shown in normal cases, but this PR changes the tool behavior to show the description in verbose mode (`-v`). So most users won't see any difference but this can easily be enabled for people who want it.

Alternatives considered:
* Always show the description: Some people may not like this though as it can be spammy.
* Provide a new field: Possible but seems to be just more work with description already present and not otherwise used.
* Show the `repo` link. This is at the wrong level and has a slightly different purpose. Though description can just be set to the same url where that is correct.
The original `_handle_readonly` was flagged as not returning `object` even though the actual shutl.rmtree` does not use a return value.
So here we actually follow the requirements as seen by mymy iterally (which the local mymp in venv confirms to be correct).
@asottile
Copy link
Member

please don't waste time on implementation until a feature is agreed on

@asottile asottile closed this Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants