Title: Fix logging error message by larsoner · Pull Request #22276 · python/cpython · GitHub
Open Graph Title: Fix logging error message by larsoner · Pull Request #22276 · python/cpython
X Title: Fix logging error message by larsoner · Pull Request #22276 · python/cpython
Description: Not 100% sure if this needs an issue since I considered it trivial at first -- master has this pattern: raise ValueError("Unknown level: %r" % level) this fails if level is a tuple. This PR switches to f-string, but an alternative to keep % would be just to do % (level,). But when implementing a test by reusing assert_error_message I noticed that assert_error_message was not doing what I think it was intended to do -- it never really checked to make sure the emitted error message actually matched the given error message. So I refactored it to actually check that the error message matched the one passed to assert_error_message, which then required fixing a few existing tests in FormatterTest, as the messages were actually outdated.
Open Graph Description: Not 100% sure if this needs an issue since I considered it trivial at first -- master has this pattern: raise ValueError("Unknown level: %r" % level) this fails if level is a tuple. This...
X Description: Not 100% sure if this needs an issue since I considered it trivial at first -- master has this pattern: raise ValueError("Unknown level: %r" % level) this fails if level is a tup...
Opengraph URL: https://github.com/python/cpython/pull/22276
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:f5c160dc-b548-b289-91a9-5424c7809e5f |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 9DCE:1E1D6F:B2FCC2:F77730:696A87F8 |
| html-safe-nonce | 4d959d00609464b9dfa98eaa1557e6d0bf4db219c116cab67bf196391b0120f8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RENFOjFFMUQ2RjpCMkZDQzI6Rjc3NzMwOjY5NkE4N0Y4IiwidmlzaXRvcl9pZCI6IjM0OTMwODQ0MTgxMzU0NTk4MzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7a46114d4f50ed8ccec4ffa36c8523a256c38cbc0b440d314de8b8e3dbf5a87b |
| hovercard-subject-tag | pull_request:487985668 |
| 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/22276/checks |
| twitter:image | https://avatars.githubusercontent.com/u/2365790?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/2365790?s=400&v=4 |
| og:image:alt | Not 100% sure if this needs an issue since I considered it trivial at first -- master has this pattern: raise ValueError("Unknown level: %r" % level) this fails if level is a tuple. This... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d2aa6dedd7d97fa651b17c40401f2605f309df5ca5fb659bf0554cf34f1de825 |
| 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 | c1dbca8981c5e3d6a69bce2f1d289e732b86241d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width