Skip to content

Commit 61a3cf5

Browse files
docs: Clarify private module imports policy in AGENTS.md
- Updated AGENTS.md to allow private module imports in tests when required for validating request serialization or server-facing payload contracts. - Emphasized preference for public modules in tests whenever possible. Assisted-by: Codex
1 parent b6a345f commit 61a3cf5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@
149149
a shared validation suite when multiple endpoints rely on the same input rules
150150
(e.g., `tests/test_graphic_payload_validation.py`).
151151
- Do not import from private modules (names beginning with an underscore) in
152-
tests or production code—expose any shared helpers via a public module first.
152+
production code. In tests, prefer public modules first; allow private-model
153+
imports only when necessary to validate request serialization or mock
154+
server-facing payload contracts that are not exposed publicly.
153155

154156
## Testing Guidelines
155157

0 commit comments

Comments
 (0)