scrapy.utils.console.DEFAULT_PYTHON_SHELLS: OrderedDict → dict (#5795)

This commit is contained in:
Serhii A 2023-01-17 13:52:41 +02:00 committed by GitHub
parent 2f12f5c259
commit caaeb235a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 7 deletions

View File

@ -1,5 +1,4 @@
from functools import wraps
from collections import OrderedDict
def _embed_ipython_shell(namespace={}, banner=''):
@ -63,12 +62,12 @@ def _embed_standard_shell(namespace={}, banner=''):
return wrapper
DEFAULT_PYTHON_SHELLS = OrderedDict([
('ptpython', _embed_ptpython_shell),
('ipython', _embed_ipython_shell),
('bpython', _embed_bpython_shell),
('python', _embed_standard_shell),
])
DEFAULT_PYTHON_SHELLS = {
'ptpython': _embed_ptpython_shell,
'ipython': _embed_ipython_shell,
'bpython': _embed_bpython_shell,
'python': _embed_standard_shell,
}
def get_shell_embed_func(shells=None, known_shells=None):