Skip to content

Commit

Permalink
Add a diagram for load_pytd.
Browse files Browse the repository at this point in the history
It's a png because I tried svg first and none of the text labels rendered - no
clue if it was an export issue or a rendering issue.

PiperOrigin-RevId: 327898790
  • Loading branch information
rchen152 committed Aug 27, 2020
1 parent 3efc42c commit 53be821
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Binary file added docs/developers/load_pytd.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 7 additions & 3 deletions docs/developers/type_stubs.md
Expand Up @@ -9,7 +9,7 @@
* [Stub generation](#stub-generation)
* [Pickling](#pickling)

<!-- Added by: rechen, at: 2020-08-14T17:30-07:00 -->
<!-- Added by: rechen, at: 2020-08-21T16:54-07:00 -->

<!--te-->

Expand Down Expand Up @@ -83,8 +83,12 @@ dependency graph from which imports_info is constructed.
If an import can't be resolved locally, pytype falls back to the standard
library, then typeshed/third_party.

<!-- TODO(rechen): Add a diagram showing the relationship between all the
import and load methods in load_pytd. -->
The following diagram shows a common import resolution path: the VM calls the
loader, which finds the right file path and then parses the contents into an
AST. The bolded methods are the entrypoints into the loader, which also happen
to be the methods that do AST postprocessing and finalization.

![load_pytd diagram](load_pytd.png)

## Parser

Expand Down

0 comments on commit 53be821

Please sign in to comment.