Skip to content

Commit a0fa590

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 8d6220c commit a0fa590

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
@@ -125,7 +125,9 @@
125125
a shared validation suite when multiple endpoints rely on the same input rules
126126
(e.g., `tests/test_graphic_payload_validation.py`).
127127
- Do not import from private modules (names beginning with an underscore) in
128-
tests or production code—expose any shared helpers via a public module first.
128+
production code. In tests, prefer public modules first; allow private-model
129+
imports only when necessary to validate request serialization or mock
130+
server-facing payload contracts that are not exposed publicly.
129131

130132
## Testing Guidelines
131133

0 commit comments

Comments
 (0)