Title: Add "never return bool for success/failure" guideline to function design skill by Copilot · Pull Request #1778 · usethis-python/usethis-python · GitHub
Open Graph Title: Add "never return bool for success/failure" guideline to function design skill by Copilot · Pull Request #1778 · usethis-python/usethis-python
X Title: Add "never return bool for success/failure" guideline to function design skill by Copilot · Pull Request #1778 · usethis-python/usethis-python
Description: Agent config lacked guidance against C-style bool returns for operation outcomes, leading to generated code like def add_entry(...) -> bool instead of raising exceptions. Added "Never return bool to signal success or failure" section to usethis-python-functions skill (v1.2 → v1.3) Includes rationale, alternatives (raise/return None), and bad/good examples Explicit carve-out for predicate functions (is_tool_used(), has_build_system()) where bool is appropriate # Bad: caller can silently ignore failure def add_config_entry(key: str, value: str) -> bool: if key in existing: return False existing[key] = value return True # Good: raise on failure, return nothing on success def add_config_entry(key: str, value: str) -> None: if key in existing: raise ValueError(f"Config entry '{key}' already exists.") existing[key] = value Skills used: usethis-skills-modify, usethis-qa-static-checks.
Open Graph Description: Agent config lacked guidance against C-style bool returns for operation outcomes, leading to generated code like def add_entry(...) -> bool instead of raising exceptions. Added "Never retu...
X Description: Agent config lacked guidance against C-style bool returns for operation outcomes, leading to generated code like def add_entry(...) -> bool instead of raising exceptions. Added "Ne...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1778
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:1da62923-2ce8-35e6-5506-f650ad38e446 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AD0E:FCF93:158A105:1F87601:6A4E4A44 |
| html-safe-nonce | 072f61b21ba23e31f0f06accd433410c987b7709509cff28c9db43051572719d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDBFOkZDRjkzOjE1OEExMDU6MUY4NzYwMTo2QTRFNEE0NCIsInZpc2l0b3JfaWQiOiIzMjg3MzQ0OTUzODg2NTczMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 41d06cf8cccd08d04d3091a0c67ef87891f2dfb009f4f59e15facf3ade7b5a45 |
| hovercard-subject-tag | pull_request:3487355238 |
| 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/1778/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 | Agent config lacked guidance against C-style bool returns for operation outcomes, leading to generated code like def add_entry(...) -> bool instead of raising exceptions. Added "Never retu... |
| 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 | e8506f6d0538364886e3f0153c154c410965e70d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width