mirror of https://github.com/scrapy/scrapy.git
Merge pull request #2229 from ahlinc/fix_shell_completion
[MRG+1] Fix completion in `scrapy shell` for new imports
This commit is contained in:
commit
24bb91528a
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue