From 84f6dbffbd20fca3b6a3eb00c5eecee3436f6d5f Mon Sep 17 00:00:00 2001 From: Ethan Smith Date: Thu, 11 Oct 2018 19:02:23 -0700 Subject: [PATCH] Clarify ordering of PEP 561 module resolution --- pep-0561.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pep-0561.rst b/pep-0561.rst index 652d472d55b..48b319a1aee 100644 --- a/pep-0561.rst +++ b/pep-0561.rst @@ -163,13 +163,14 @@ Type Checker Module Resolution Order The following is the order in which type checkers supporting this PEP SHOULD resolve modules containing type information: -1. User code - the files the type checker is running on. -2. Stubs or Python source manually put in the beginning of the path. Type +1. Stubs or Python source manually put in the beginning of the path. Type checkers SHOULD provide this to allow the user complete control of which stubs to use, and to patch broken stubs/inline types from packages. In mypy the ``$MYPYPATH`` environment variable can be used for this. +2. User code - the files the type checker is running on. + 3. Stub packages - these packages SHOULD supersede any installed inline package. They can be found at ``foopkg-stubs`` for package ``foopkg``.