Title: Test that all KeyValueFileManagers support empty files by Copilot · Pull Request #1467 · usethis-python/usethis-python · GitHub
Open Graph Title: Test that all KeyValueFileManagers support empty files by Copilot · Pull Request #1467 · usethis-python/usethis-python
X Title: Test that all KeyValueFileManagers support empty files by Copilot · Pull Request #1467 · usethis-python/usethis-python
Description: Empty files should be valid for all KeyValueFileManager subclasses and correspond to an empty map. This is a prerequisite for #241 (lazy pyproject.toml creation from within config methods).
Adds tests for each manager type (TOMLFileManager, YAMLFileManager, INIFileManager) verifying:
read_file() succeeds on an empty file
__getitem__([]) returns {}
__contains__([]) returns True
__contains__ with a nonexistent key returns False
All three parsers already handle empty content correctly — these tests codify that guarantee.
Original prompt
This section details on the original issue you should resolve
Open Graph Description: Empty files should be valid for all KeyValueFileManager subclasses and correspond to an empty map. This is a prerequisite for #241 (lazy pyproject.toml creation from within config methods). Adds te...
X Description: Empty files should be valid for all KeyValueFileManager subclasses and correspond to an empty map. This is a prerequisite for #241 (lazy pyproject.toml creation from within config methods). Adds te...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1467
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:049d5389-3bce-b9ce-861f-3f4cc5eca5c8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 85EA:4D83E:150F2EB:1D4A60B:6A4DF2B0 |
| html-safe-nonce | 6ad0403cd726c945f1d0973efbd51e5271507507fb57678347e188fd51631fb7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NUVBOjREODNFOjE1MEYyRUI6MUQ0QTYwQjo2QTRERjJCMCIsInZpc2l0b3JfaWQiOiI1NDAzODU4OTAyMjA1NzIzMzEyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f4c0b82f975c61acfdd123ee49d37cf6ce14f210c47bd1afef041d69ac33c9cd |
| hovercard-subject-tag | pull_request:3431165062 |
| 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/1467/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 | Empty files should be valid for all KeyValueFileManager subclasses and correspond to an empty map. This is a prerequisite for #241 (lazy pyproject.toml creation from within config methods). Adds te... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5818716c93c6a2925b815402541a32814e43a7b1261c322b0c2df75224289566 |
| 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 | f4bb89367ca678f057d79b1abc45d6675b1bd5b2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width