| 30 | |
| 31 | |
| 32 | def found_undocumented(singular: bool) -> str: |
| 33 | some = "an" if singular else "some" |
| 34 | s = "" if singular else "s" |
| 35 | these = "this" if singular else "these" |
| 36 | them = "it" if singular else "them" |
| 37 | were = "was" if singular else "were" |
| 38 | |
| 39 | return ( |
| 40 | textwrap.dedent( |
| 41 | f""" |
| 42 | Found {some} undocumented C API{s}! |
| 43 | |
| 44 | Python requires documentation on all public C API symbols, macros, and types. |
| 45 | If {these} API{s} {were} not meant to be public, prefix {them} with a |
| 46 | leading underscore (_PySomething_API) or move {them} to the internal C API |
| 47 | (pycore_*.h files). |
| 48 | |
| 49 | In exceptional cases, certain APIs can be ignored by adding them to |
| 50 | Tools/check-c-api-docs/ignored_c_api.txt |
| 51 | """ |
| 52 | ) |
| 53 | + MISTAKE |
| 54 | ) |
| 55 | |
| 56 | |
| 57 | def found_ignored_documented(singular: bool) -> str: |