summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-01-02 16:20:14 -0500
committerJason R. Coombs <jaraco@jaraco.com>2016-01-02 16:20:14 -0500
commitec6c4f913a47acf5b4ed1bd5bda05c47f234088a (patch)
tree6c2f70bdf1242e7e445b6f3d78579e75def2fcc0
parent3a0c714c6f9baa032c5425c04d59e567b13fea6c (diff)
downloadpython-setuptools-bitbucket-ec6c4f913a47acf5b4ed1bd5bda05c47f234088a.tar.gz
Add some docstrings
-rw-r--r--pkg_resources/extern/__init__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py
index 9b1599f8..2d338426 100644
--- a/pkg_resources/extern/__init__.py
+++ b/pkg_resources/extern/__init__.py
@@ -13,10 +13,17 @@ class VendorImporter:
@property
def search_path(self):
+ """
+ Search first the vendor package then as a natural package.
+ """
yield self.vendor_pkg + '.'
yield ''
def find_module(self, fullname, path=None):
+ """
+ Return self when fullname starts with root_name and the
+ target module is one vendored through this importer.
+ """
root, base, target = fullname.partition(self.root_name + '.')
if root:
return
@@ -25,6 +32,9 @@ class VendorImporter:
return self
def load_module(self, fullname):
+ """
+ Iterate over the search path to locate and load fullname.
+ """
root, base, target = fullname.partition(self.root_name + '.')
for prefix in self.search_path:
try:
@@ -45,6 +55,9 @@ class VendorImporter:
)
def install(self):
+ """
+ Install this importer into sys.meta_path if not already present.
+ """
if self not in sys.meta_path:
sys.meta_path.append(self)