mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-08 23:50:38 +03:00
Update module_loading documents
This commit is contained in:
parent
087f1c55cd
commit
3822d6568e
|
@ -5,7 +5,10 @@ from importlib import import_module
|
|||
def import_string(dotted_path, dotted_attributes=None):
|
||||
"""
|
||||
Import a dotted module path and return the attribute/class designated by the
|
||||
last name in the path. Raise ImportError if the import failed.
|
||||
last name in the path. When a dotted attribute path is also provided, the
|
||||
dotted attribute path would be applied to the attribute/class retrieved from
|
||||
the first step, and return the corresponding value designated by the
|
||||
attribute path. Raise ImportError if the import failed.
|
||||
"""
|
||||
try:
|
||||
module_path, class_name = dotted_path.rsplit('.', 1)
|
||||
|
|
Loading…
Reference in New Issue
Block a user