Title: Add tests for source layout inference and import linter contracts with `setup.py` by Copilot · Pull Request #1858 · usethis-python/usethis-python · GitHub
Open Graph Title: Add tests for source layout inference and import linter contracts with `setup.py` by Copilot · Pull Request #1858 · usethis-python/usethis-python
X Title: Add tests for source layout inference and import linter contracts with `setup.py` by Copilot · Pull Request #1858 · usethis-python/usethis-python
Description: setup.py presence in a flat-layout project was untested for both source layout inference and import linter contract generation — a potential regression surface when setup.py exists alongside a real Python package. Changes test_layout.py — adds test_setup_py_present: asserts get_source_dir_str() returns "." when only setup.py is present (no src/ directory) test_import_linter.py — adds test_flat_layout_with_setup_py to TestGetConfigSpec: creates a flat-layout project with setup.py + a proper package (myflatpkg/ with 3 interdependent modules), then asserts: "setup" is not in the generated contract names (i.e. setup.py is not mistaken for a package) "myflatpkg" is present as a contract .pre-commit-config.yaml / docs/functions.txt / AGENTS.md — fixes a pre-existing check-agent-file-sizes violation (514 lines vs. 500-line limit) by adding --skip-private to the export-functions hook. Private (_-prefixed) functions are implementation details agents shouldn't reference directly; removing them reduces AGENTS.md to 477 lines.
Open Graph Description: setup.py presence in a flat-layout project was untested for both source layout inference and import linter contract generation — a potential regression surface when setup.py exists alongside a real...
X Description: setup.py presence in a flat-layout project was untested for both source layout inference and import linter contract generation — a potential regression surface when setup.py exists alongside a real...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1858
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c3b59072-93c8-11f9-71d0-bafc6c125595 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E688:39430A:E64E71:14672EF:6A4CAEF0 |
| html-safe-nonce | 5771899e225670ef2933452cc6a889fae4b8ace3f596687d7ee0204b35133492 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjg4OjM5NDMwQTpFNjRFNzE6MTQ2NzJFRjo2QTRDQUVGMCIsInZpc2l0b3JfaWQiOiI5MDk2Nzc3NzE0Mzc5ODI4OTc2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 95cab200942420121df80c135b472021d6e098e6b2b319ca7e6a35f76a503f00 |
| hovercard-subject-tag | pull_request:3497124070 |
| 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/1858/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 | setup.py presence in a flat-layout project was untested for both source layout inference and import linter contract generation — a potential regression surface when setup.py exists alongside a real... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| 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 | ae90d426644ca15e89bacceb72e51f4e9dbf85f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width