##// END OF EJS Templates
reformat rest of ipython
Matthias Bussonnier -
Show More
@@ -75,7 +75,7 b' sys.meta_path.insert(0, ID)'
75
75
76 def commit_api(api):
76 def commit_api(api):
77 """Commit to a particular API, and trigger ImportErrors on subsequent
77 """Commit to a particular API, and trigger ImportErrors on subsequent
78 dangerous imports"""
78 dangerous imports"""
79 modules = set(api_to_module.values())
79 modules = set(api_to_module.values())
80
80
81 modules.remove(api_to_module[api])
81 modules.remove(api_to_module[api])
@@ -115,15 +115,15 b' def loaded_api():'
115 def has_binding(api):
115 def has_binding(api):
116 """Safely check for PyQt4/5, PySide or PySide2, without importing submodules
116 """Safely check for PyQt4/5, PySide or PySide2, without importing submodules
117
117
118 Parameters
118 Parameters
119 ----------
119 ----------
120 api : str [ 'pyqtv1' | 'pyqt' | 'pyqt5' | 'pyside' | 'pyside2' | 'pyqtdefault']
120 api : str [ 'pyqtv1' | 'pyqt' | 'pyqt5' | 'pyside' | 'pyside2' | 'pyqtdefault']
121 Which module to check for
121 Which module to check for
122
122
123 Returns
123 Returns
124 -------
124 -------
125 True if the relevant module appears to be importable
125 True if the relevant module appears to be importable
126 """
126 """
127 module_name = api_to_module[api]
127 module_name = api_to_module[api]
128 from importlib.util import find_spec
128 from importlib.util import find_spec
129
129
@@ -193,9 +193,8 b' def import_pyqt4(version=2):'
193 Parameters
193 Parameters
194 ----------
194 ----------
195 version : 1, 2, or None
195 version : 1, 2, or None
196 Which QString/QVariant API to use. Set to None to use the system
196 Which QString/QVariant API to use. Set to None to use the system
197 default
197 default
198
199 ImportErrors raised within this function are non-recoverable
198 ImportErrors raised within this function are non-recoverable
200 """
199 """
201 # The new-style string API (version=2) automatically
200 # The new-style string API (version=2) automatically
@@ -319,13 +318,12 b' def load_qt(api_options):'
319
318
320 Parameters
319 Parameters
321 ----------
320 ----------
322 api_options: List of strings
321 api_options : List of strings
323 The order of APIs to try. Valid items are 'pyside', 'pyside2',
322 The order of APIs to try. Valid items are 'pyside', 'pyside2',
324 'pyqt', 'pyqt5', 'pyqtv1' and 'pyqtdefault'
323 'pyqt', 'pyqt5', 'pyqtv1' and 'pyqtdefault'
325
324
326 Returns
325 Returns
327 -------
326 -------
328
329 A tuple of QtCore, QtGui, QtSvg, QT_API
327 A tuple of QtCore, QtGui, QtSvg, QT_API
330 The first three are the Qt modules. The last is the
328 The first three are the Qt modules. The last is the
331 string indicating which module was loaded.
329 string indicating which module was loaded.
@@ -116,7 +116,7 b' class BackgroundJobManager(object):'
116 The given expression is passed to eval(), along with the optional
116 The given expression is passed to eval(), along with the optional
117 global/local dicts provided. If no dicts are given, they are
117 global/local dicts provided. If no dicts are given, they are
118 extracted automatically from the caller's frame.
118 extracted automatically from the caller's frame.
119
119
120 A Python statement is NOT a valid eval() expression. Basically, you
120 A Python statement is NOT a valid eval() expression. Basically, you
121 can only use as an eval() argument something which can go on the right
121 can only use as an eval() argument something which can go on the right
122 of an '=' sign and be assigned to a variable.
122 of an '=' sign and be assigned to a variable.
@@ -239,7 +239,7 b' class Demo(object):'
239 terminal16m
239 terminal16m
240
240
241 - style('default'): a string of pygments style name to be used.
241 - style('default'): a string of pygments style name to be used.
242 """
242 """
243 if hasattr(src, "read"):
243 if hasattr(src, "read"):
244 # It seems to be a file or a file-like object
244 # It seems to be a file or a file-like object
245 self.fname = "from a file-like object"
245 self.fname = "from a file-like object"
@@ -517,20 +517,20 b' class FileLinks(FileLink):'
517 fp_cleaner=None):
517 fp_cleaner=None):
518 """ generate built-in formatter function
518 """ generate built-in formatter function
519
519
520 this is used to define both the notebook and terminal built-in
520 this is used to define both the notebook and terminal built-in
521 formatters as they only differ by some wrapper text for each entry
521 formatters as they only differ by some wrapper text for each entry
522
522
523 dirname_output_format: string to use for formatting directory
523 dirname_output_format: string to use for formatting directory
524 names, dirname will be substituted for a single "%s" which
524 names, dirname will be substituted for a single "%s" which
525 must appear in this string
525 must appear in this string
526 fname_output_format: string to use for formatting file names,
526 fname_output_format: string to use for formatting file names,
527 if a single "%s" appears in the string, fname will be substituted
527 if a single "%s" appears in the string, fname will be substituted
528 if two "%s" appear in the string, the path to fname will be
528 if two "%s" appear in the string, the path to fname will be
529 substituted for the first and fname will be substituted for the
529 substituted for the first and fname will be substituted for the
530 second
530 second
531 fp_format: string to use for formatting filepaths, must contain
531 fp_format: string to use for formatting filepaths, must contain
532 exactly two "%s" and the dirname will be substituted for the first
532 exactly two "%s" and the dirname will be substituted for the first
533 and fname will be substituted for the second
533 and fname will be substituted for the second
534 """
534 """
535 def f(dirname, fnames, included_suffixes=None):
535 def f(dirname, fnames, included_suffixes=None):
536 result = []
536 result = []
@@ -77,7 +77,6 b" def latex_to_png(s, encode=False, backend=None, wrap=False, color='Black',"
77 format, e.g. '#AA20FA'.
77 format, e.g. '#AA20FA'.
78 scale : float
78 scale : float
79 Scale factor for the resulting PNG.
79 Scale factor for the resulting PNG.
80
81 None is returned when the backend cannot be used.
80 None is returned when the backend cannot be used.
82
81
83 """
82 """
General Comments 0
You need to be logged in to leave comments. Login now