From c509ce282ea313879a999cbf1b3d4fdb94a08142 Mon Sep 17 00:00:00 2001 From: Ethan Smith Date: Thu, 11 Oct 2018 20:36:04 -0700 Subject: [PATCH] Clarify ordering of PEP 561 module resolution (#807) As brought up in python/mypy#5520. --- pep-0561.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pep-0561.rst b/pep-0561.rst index 652d472d5..48b319a1a 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``.