From f0ec92915d37e5edd446aac84b6fa0c4345dc12b 2017-04-21 14:14:31 From: Thomas Kluyver <takowl@gmail.com> Date: 2017-04-21 14:14:31 Subject: [PATCH] Merge pull request #10476 from frenzymadness/5.x Fix bug in generating shortcuts --- diff --git a/docs/autogen_shortcuts.py b/docs/autogen_shortcuts.py index b65ad99..da9e314 100755 --- a/docs/autogen_shortcuts.py +++ b/docs/autogen_shortcuts.py @@ -1,6 +1,7 @@ from os.path import abspath, dirname, join from IPython.terminal.interactiveshell import KeyBindingManager +from IPython.utils.py3compat import string_types def name(c): @@ -60,7 +61,7 @@ for kb in ipy_bindings: if not doc or doc in dummy_docs: continue - shortcut = ' '.join([k if isinstance(k, str) else k.name for k in kb.keys]) + shortcut = ' '.join([k if isinstance(k, string_types) else k.name for k in kb.keys]) shortcut += shortcut.endswith('\\') and '\\' or '' if hasattr(kb.filter, 'filters'): flt = ' '.join(multi_filter_str(kb.filter))