9191
9292
9393def _stdlib_paths ():
94- """Return a set of paths from which Python imports the standard library.
94+ """
95+ Return a set of paths from which Python imports the standard library.
9596 """
9697 attr_candidates = [
9798 'prefix' ,
@@ -111,8 +112,8 @@ def _stdlib_paths():
111112
112113
113114def is_stdlib_name (modname ):
114- """Return :data:`True` if `modname` appears to come from the standard
115- library.
115+ """
116+ Return :data:`True` if `modname` appears to come from the standard library.
116117 """
117118 if imp .is_builtin (modname ) != 0 :
118119 return True
@@ -139,7 +140,8 @@ def is_stdlib_path(path):
139140
140141
141142def get_child_modules (path ):
142- """Return the suffixes of submodules directly neated beneath of the package
143+ """
144+ Return the suffixes of submodules directly neated beneath of the package
143145 directory at `path`.
144146
145147 :param str path:
@@ -301,8 +303,10 @@ class ThreadWatcher(object):
301303
302304 @classmethod
303305 def _reset (cls ):
304- """If we have forked since the watch dictionaries were initialized, all
305- that has is garbage, so clear it."""
306+ """
307+ If we have forked since the watch dictionaries were initialized, all
308+ that has is garbage, so clear it.
309+ """
306310 if os .getpid () != cls ._cls_pid :
307311 cls ._cls_pid = os .getpid ()
308312 cls ._cls_instances_by_target .clear ()
@@ -668,7 +672,8 @@ def add_source_override(self, fullname, path, source, is_pkg):
668672 ]
669673
670674 def get_module_source (self , fullname ):
671- """Given the name of a loaded module `fullname`, attempt to find its
675+ """
676+ Given the name of a loaded module `fullname`, attempt to find its
672677 source code.
673678
674679 :returns:
@@ -692,9 +697,10 @@ def get_module_source(self, fullname):
692697 return tup
693698
694699 def resolve_relpath (self , fullname , level ):
695- """Given an ImportFrom AST node, guess the prefix that should be tacked
696- on to an alias name to produce a canonical name. `fullname` is the name
697- of the module in which the ImportFrom appears.
700+ """
701+ Given an ImportFrom AST node, guess the prefix that should be tacked on
702+ to an alias name to produce a canonical name. `fullname` is the name of
703+ the module in which the ImportFrom appears.
698704 """
699705 mod = sys .modules .get (fullname , None )
700706 if hasattr (mod , '__path__' ):
@@ -845,9 +851,11 @@ def blacklist_prefix(self, fullname):
845851 self .blacklist .append (fullname )
846852
847853 def neutralize_main (self , path , src ):
848- """Given the source for the __main__ module, try to find where it
849- begins conditional execution based on a "if __name__ == '__main__'"
850- guard, and remove any code after that point."""
854+ """
855+ Given the source for the __main__ module, try to find where it begins
856+ conditional execution based on a "if __name__ == '__main__'" guard, and
857+ remove any code after that point.
858+ """
851859 match = self .MAIN_RE .search (src )
852860 if match :
853861 return src [:match .start ()]
0 commit comments