Title: gh-104050: Argument clinic: annotate `post_parsing()` and `cleanup()` by AlexWaygood · Pull Request #107225 · python/cpython · GitHub
Open Graph Title: gh-104050: Argument clinic: annotate `post_parsing()` and `cleanup()` by AlexWaygood · Pull Request #107225 · python/cpython
X Title: gh-104050: Argument clinic: annotate `post_parsing()` and `cleanup()` by AlexWaygood · Pull Request #107225 · python/cpython
Description: The docstring for CConverter.post_parsing() is here: cpython/Tools/clinic/clinic.py Lines 3021 to 3026 in f443b54 def post_parsing(self) -> str: """ The C statements required to do some operations after the end of parsing but before cleaning up. Return a string containing this code indented at column 0. If no operation is necessary, return an empty string. """ The docstring for CConverter.cleanup() is here: cpython/Tools/clinic/clinic.py Lines 3029 to 3034 in f443b54 def cleanup(self) -> str: """ The C statements required to clean up after this variable. Returns a string containing this code indented at column 0. If no cleanup is necessary, returns an empty string. """ Both docstrings state that these methods should always return a str, so it's arguably a micro-bug that str_converter.post_parsing() Py_UNICODE_converter.cleanup() can both sometimes return None currently, since str_converter and Py_UNICODE_converter are both subclasses of CConverter. (The micro-bug doesn't result in any erroneous behaviour currently, however.) As such, I've slightly changed the implementations of these methods so that they always return a str, like the docstring promises. Issue: gh-104050
Open Graph Description: The docstring for CConverter.post_parsing() is here: cpython/Tools/clinic/clinic.py Lines 3021 to 3026 in f443b54 ...
X Description: The docstring for CConverter.post_parsing() is here: cpython/Tools/clinic/clinic.py Lines 3021 to 3026 in f443b54 ...
Opengraph URL: https://github.com/python/cpython/pull/107225
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:6bc010be-28ba-ce6f-d9de-1a257e4e4db8 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 911A:124678:845BA1:B134C9:6969DFA1 |
| html-safe-nonce | d4714a6c161a8c0e32895f283e93bcd0f92f56eb38417dc5d590dc7ca0dab3bc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTFBOjEyNDY3ODo4NDVCQTE6QjEzNEM5OjY5NjlERkExIiwidmlzaXRvcl9pZCI6IjgyNjMwODk2MDExNzc1NzUzMjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8123501b09ca2bb685e6d2e4429e19590f80b3d30654f41b1c5a9ceff820ded9 |
| hovercard-subject-tag | pull_request:1448148152 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/python/cpython/pull/107225/checks |
| twitter:image | https://avatars.githubusercontent.com/u/66076021?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/66076021?s=400&v=4 |
| og:image:alt | The docstring for CConverter.post_parsing() is here: cpython/Tools/clinic/clinic.py Lines 3021 to 3026 in f443b54 ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width