Title: Remove strict git requirement in usethis tool pre-commit by Copilot · Pull Request #1854 · usethis-python/usethis-python · GitHub
Open Graph Title: Remove strict git requirement in usethis tool pre-commit by Copilot · Pull Request #1854 · usethis-python/usethis-python
X Title: Remove strict git requirement in usethis tool pre-commit by Copilot · Pull Request #1854 · usethis-python/usethis-python
Description: Add _is_git_repo() helper to src/usethis/_integrations/pre_commit/core.py Modify install_pre_commit_hooks() to check for git availability before running, showing an informational message + install instruction instead of failing Modify uninstall_pre_commit_hooks() similarly for the uv/poetry backends Update test_err tests (renamed to test_no_git_repo) to verify graceful no-error behaviour with info message Add _is_git_repo mock to backend-specific tests so subprocess paths are still exercised Fix static checks: remove private _is_git_repo from AGENTS.md and docs/functions.txt function references Update test_no_git_repo tests to check exact output messages with explicit backend set Create lesson: always use exact equality for console-output tests — filed as #1866 Refactor uninstall_pre_commit_hooks() to swap nesting order, eliminating duplicated info_print and tick_print Create lesson: structure if-else nesting to avoid duplicated string literals — filed as #1869 Create lesson: keep enum-based if-statements at the innermost nesting level — filed as #1870 Resolves #1862
Open Graph Description: Add _is_git_repo() helper to src/usethis/_integrations/pre_commit/core.py Modify install_pre_commit_hooks() to check for git availability before running, showing an informational message + install...
X Description: Add _is_git_repo() helper to src/usethis/_integrations/pre_commit/core.py Modify install_pre_commit_hooks() to check for git availability before running, showing an informational message + install...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1854
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d8cf5b71-ca21-f332-ae39-55285ea32f9e |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AF24:69662:1F43093:2AF4370:6A4ECFA0 |
| html-safe-nonce | d4f99872252419d75a911fa8454e571a53a5129c109ab92fff3bee1d1915336d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjI0OjY5NjYyOjFGNDMwOTM6MkFGNDM3MDo2QTRFQ0ZBMCIsInZpc2l0b3JfaWQiOiIyODczMDY4NDQwMDI1MDQ2MDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a3bf4329d0d480f8fef165b027975fe525363a4211802289663f5d8985f5130e |
| hovercard-subject-tag | pull_request:3497015536 |
| 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/1854/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 | Add _is_git_repo() helper to src/usethis/_integrations/pre_commit/core.py Modify install_pre_commit_hooks() to check for git availability before running, showing an informational message + install... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| 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 | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width