1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-24 07:43:48 +00:00

Fix completion in scrapy shell for new imports

This commit is contained in:
Andrew Hlynskyi 2016-09-12 00:43:58 +03:00
parent 0ef570f6f0
commit 80260824c6

View File

@ -13,7 +13,9 @@ def _embed_ipython_shell(namespace={}, banner=''):
@wraps(_embed_ipython_shell)
def wrapper(namespace=namespace, banner=''):
config = load_default_config()
shell = InteractiveShellEmbed(
# Always use .instace() to ensure _instance propagation to all parents
# this is needed for <TAB> completion works well for new imports
shell = InteractiveShellEmbed.instance(
banner1=banner, user_ns=namespace, config=config)
shell()
return wrapper