Title: gh-106368: Argument clinic: improve coverage for `self.valid_line()` calls by AlexWaygood · Pull Request #107641 · python/cpython · GitHub
Open Graph Title: gh-106368: Argument clinic: improve coverage for `self.valid_line()` calls by AlexWaygood · Pull Request #107641 · python/cpython
X Title: gh-106368: Argument clinic: improve coverage for `self.valid_line()` calls by AlexWaygood · Pull Request #107641 · python/cpython
Description: The early return in self.state_modulename_name() is unreachable, as state_modulename_name() is only ever called from state_dsl_start, and the first thing state_dsl_start does is check whether the line is valid: cpython/Tools/clinic/clinic.py Lines 4655 to 4657 in 321f0f7 if not self.valid_line(line): return There are two other if not self.valid_line(line) branches in clinic.py which are reachable, but are uncovered: cpython/Tools/clinic/clinic.py Lines 5323 to 5330 in 321f0f7 def state_function_docstring(self, line: str) -> None: assert self.function is not None if self.group: fail(f"Function {self.function.name!r} has a ']' without a matching '['.") if not self.valid_line(line): return cpython/Tools/clinic/clinic.py Lines 5304 to 5306 in 321f0f7 def state_parameter_docstring(self, line: str) -> None: if not self.valid_line(line): return Add a test that covers both of them. Issue: gh-106368
Open Graph Description: The early return in self.state_modulename_name() is unreachable, as state_modulename_name() is only ever called from state_dsl_start, and the first thing state_dsl_start does is check whether the l...
X Description: The early return in self.state_modulename_name() is unreachable, as state_modulename_name() is only ever called from state_dsl_start, and the first thing state_dsl_start does is check whether the l...
Opengraph URL: https://github.com/python/cpython/pull/107641
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:40044ba1-12ee-8a2b-d16e-fb662a03199d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9B0A:21AC08:157CDC:1DEF9B:696A6C3B |
| html-safe-nonce | 84c4112a5d15c5c023f7101fd5ed61047bfd4b85cb8f9a0bc256902f79b963d0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjBBOjIxQUMwODoxNTdDREM6MURFRjlCOjY5NkE2QzNCIiwidmlzaXRvcl9pZCI6IjYzNDk1OTg1MzYxNjAwMDA1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | be2ec45f6066bb14a2c1b33aa923d7e982b291a740c70e58159aa13f8828948f |
| hovercard-subject-tag | pull_request:1463313212 |
| 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/python/cpython/pull/107641/files |
| 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 early return in self.state_modulename_name() is unreachable, as state_modulename_name() is only ever called from state_dsl_start, and the first thing state_dsl_start does is check whether the l... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6fea32d5b7276b841b7a803796d9715bc6cfb31ed549fdf9de2948ac25d12ba6 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f2d9f6432a5a115ec709295ae70623f33bb80aee |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width