ALL-WRIT1002 · docstring_language
Keep source docstrings in one configured project language.
This is a contextual rule for all languages. Read its implementation.
Definition
Section titled “Definition”Classify each substantial docstring as target, other, or uncertain. The configured target
is target_language, which defaults to American English. Judge only the docstring text. Do not
guess from short fragments, code blocks, identifiers, protocol words, or proper names.
Evidence
Section titled “Evidence”Each finding cites the exact declaration range, docstring text, model confidence, and model
provenance. minimum_characters excludes fragments that language identification models cannot
distinguish reliably.
Exceptions
Section titled “Exceptions”Quoted user text and required foreign terms can remain when the surrounding explanation uses the project language. Configure another target for a repository whose readers use it.
Examples
Section titled “Examples”With the default target, Return the decoded payload. is target. A substantial Portuguese
explanation is other. HTTP client. is excluded by the length floor.
References
Section titled “References”- Cites “GlotLID”, model guidance on confidence and short text. Open reference
- Cites “Lingua”, language detection for short and mixed-language text. Open reference