]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Tweak doc structure for clarity and completeness
authorSebastián Ramírez <tiangolo@gmail.com>
Mon, 19 Dec 2022 20:00:49 +0000 (00:00 +0400)
committerSebastián Ramírez <tiangolo@gmail.com>
Mon, 19 Dec 2022 20:00:49 +0000 (00:00 +0400)
typing_doc.md

index 8e284ad77705679551c17743ccc0fbcf0991af24..112c137004febac60ef9a6c5b5427669269f7f14 100644 (file)
@@ -125,7 +125,7 @@ def utcnow() -> datetime:
 
 ## Alternate Form
 
-To avoid delaying adoption of this proposal until after the `doc()` function has been added to the typing module, type checkers may support an alternative form `__typing_doc__`. This form can be defined locally without any reliance on the `typing` or `typing_extensions` modules. It allows immediate adoption of the specification by library authors. Type checkers that have not yet adopted this specification will retain their current behavior.
+To avoid delaying adoption of this proposal until after the `doc()` function has been added to the typing module, type checkers and tools may support an alternative form `__typing_doc__`. This form can be defined locally without any reliance on the `typing` or `typing_extensions` modules. It allows immediate adoption of the specification by library authors. Type checkers that have not yet adopted this specification will retain their current behavior.
 
 To use this alternate form, library authors should include the following declaration within their type stubs or source files.
 
@@ -162,6 +162,8 @@ It wouldn't solve any of the other problems, like getting editor support (syntax
 
 ## Open Issues
 
+### Runtime Behavior
+
 Runtime behavior is still not defined. It would probably make sense to have an attribute `__typing_doc__` on the function, method, or class. `__doc__` is already reserved for docstrings.
 
 For parameters, it could include the same object in the same `Annotated` type annotations.