Title: Fix hooks printing errors to stderr instead of stdout by Copilot · Pull Request #1844 · usethis-python/usethis-python · GitHub
Open Graph Title: Fix hooks printing errors to stderr instead of stdout by Copilot · Pull Request #1844 · usethis-python/usethis-python
X Title: Fix hooks printing errors to stderr instead of stdout by Copilot · Pull Request #1844 · usethis-python/usethis-python
Description: Pre-commit/prek hooks were printing violation output to stderr and a success message to stdout. Since prek captures stdout as the primary display stream, errors could go unseen while "No forbidden patterns found in docstrings." was always the visible output. Changes hooks/check-docstring-substrings.py, check-comment-keywords.py, check-banned-words.py: Print violations to stdout, remove redundant success messages (the framework already shows Passed/Failed), drop unused sys imports Before/after # Before: errors invisible, success message always shown if violations: print("ERROR: ...", file=sys.stderr) # potentially unseen return 1 print("No forbidden patterns found in docstrings.") # always visible # After: errors visible, no noise on success if violations: print("ERROR: ...") # stdout, captured by prek return 1 return 0 Lesson Filed #1845 — pre-commit hooks must use stdout for all output (general CLI convention of errors→stderr conflicts with the pre-commit captured-output model).
Open Graph Description: Pre-commit/prek hooks were printing violation output to stderr and a success message to stdout. Since prek captures stdout as the primary display stream, errors could go unseen while "No forbi...
X Description: Pre-commit/prek hooks were printing violation output to stderr and a success message to stdout. Since prek captures stdout as the primary display stream, errors could go unseen while "No f...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1844
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e57b1961-b75d-9068-412e-53ca4e31e109 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CCC4:12A6C9:28FBE0:3B042B:6A4E2B73 |
| html-safe-nonce | 155ed13f5245152cbe94e0cf3ed79c9609994b866e043d4eb724bf97670faa0a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0M0OjEyQTZDOToyOEZCRTA6M0IwNDJCOjZBNEUyQjczIiwidmlzaXRvcl9pZCI6IjIwMDAwNzgzMDIwMTA1NTExNTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 07d334481233e06f5192646285449d70e4c0d6d45fa0f1957e0b60e551704916 |
| hovercard-subject-tag | pull_request:3496404987 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/usethis-python/usethis-python/pull/1844/files |
| twitter:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| og:image:alt | Pre-commit/prek hooks were printing violation output to stderr and a success message to stdout. Since prek captures stdout as the primary display stream, errors could go unseen while "No forbi... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git |
| octolytics-dimension-user_id | 216362695 |
| octolytics-dimension-user_login | usethis-python |
| octolytics-dimension-repository_id | 842189705 |
| octolytics-dimension-repository_nwo | usethis-python/usethis-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 842189705 |
| octolytics-dimension-repository_network_root_nwo | usethis-python/usethis-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d9dd20d38f8ae3c4cb6b597807431db300d0bd2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width