Title: io: Report warning via warn_print when silently ignoring invalid config in toml/yaml remove_from_list · Issue #1841 · usethis-python/usethis-python · GitHub
Open Graph Title: io: Report warning via warn_print when silently ignoring invalid config in toml/yaml remove_from_list · Issue #1841 · usethis-python/usethis-python
X Title: io: Report warning via warn_print when silently ignoring invalid config in toml/yaml remove_from_list · Issue #1841 · usethis-python/usethis-python
Description: In src/usethis/_file/toml/io_.py and src/usethis/_file/yaml/io_.py, the remove_from_list method silently returns when it encounters invalid config (e.g., a non-dict parent or non-list value at the target key). The user receives no feedba...
Open Graph Description: In src/usethis/_file/toml/io_.py and src/usethis/_file/yaml/io_.py, the remove_from_list method silently returns when it encounters invalid config (e.g., a non-dict parent or non-list value at the ...
X Description: In src/usethis/_file/toml/io_.py and src/usethis/_file/yaml/io_.py, the remove_from_list method silently returns when it encounters invalid config (e.g., a non-dict parent or non-list value at the ...
Opengraph URL: https://github.com/usethis-python/usethis-python/issues/1841
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"io: Report warning via warn_print when silently ignoring invalid config in toml/yaml remove_from_list","articleBody":"In `src/usethis/_file/toml/io_.py` and `src/usethis/_file/yaml/io_.py`, the `remove_from_list` method silently returns when it encounters invalid config (e.g., a non-dict parent or non-list value at the target key). The user receives no feedback that their configuration was ignored.\n\nWe should call `warn_print` to inform the user that invalid config was detected and skipped, using the error messages already provided via the `err=` arguments to `validate_or_raise`.\n\n**Affected files:**\n- `src/usethis/_file/toml/io_.py` (lines ~429-440)\n- `src/usethis/_file/yaml/io_.py` (lines ~457-468)\n\nThis is a pre-existing issue that predates the validate_or_raise refactoring — the original code also silently returned on invalid config.","author":{"url":"https://github.com/nathanjmcdougall","@type":"Person","name":"nathanjmcdougall"},"datePublished":"2026-04-07T04:46:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1841/usethis-python/issues/1841"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d6e17b41-c012-deb9-9083-0707bc8a6651 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CFBC:2348DE:F6A102:FC4530:6A4DC71C |
| html-safe-nonce | 7136c7c75670175e1d034ca6fe841c50d6f51339cb55dbbf7320b025b5d962bf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRkJDOjIzNDhERTpGNkExMDI6RkM0NTMwOjZBNERDNzFDIiwidmlzaXRvcl9pZCI6IjkxMDM0ODkyNTc5MDk4OTY5ODgiLCJyZWdpb25fZWRnZSI6InNlYSIsInJlZ2lvbl9yZW5kZXIiOiJzZWEifQ== |
| visitor-hmac | 18ecdb5c0732bc4d39e2b40827d3696baa21cb44b9ea5c96f861c8b95d3b7999 |
| hovercard-subject-tag | issue:4215476137 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/usethis-python/usethis-python/1841/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9903ce2618af3bbeb11fdf16f3ca3163d44668d150944d009530258a428c0abb/usethis-python/usethis-python/issues/1841 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9903ce2618af3bbeb11fdf16f3ca3163d44668d150944d009530258a428c0abb/usethis-python/usethis-python/issues/1841 |
| og:image:alt | In src/usethis/_file/toml/io_.py and src/usethis/_file/yaml/io_.py, the remove_from_list method silently returns when it encounters invalid config (e.g., a non-dict parent or non-list value at the ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nathanjmcdougall |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width