Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c68d988

Browse files
committed
reformat rest of ipython
1 parent ff8ba98 commit c68d988

5 files changed

Lines changed: 28 additions & 31 deletions

File tree

IPython/external/qt_loaders.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def find_spec(self, fullname, path, target=None):
7575

7676
def commit_api(api):
7777
"""Commit to a particular API, and trigger ImportErrors on subsequent
78-
dangerous imports"""
78+
dangerous imports"""
7979
modules = set(api_to_module.values())
8080

8181
modules.remove(api_to_module[api])
@@ -115,15 +115,15 @@ def loaded_api():
115115
def has_binding(api):
116116
"""Safely check for PyQt4/5, PySide or PySide2, without importing submodules
117117
118-
Parameters
119-
----------
120-
api : str [ 'pyqtv1' | 'pyqt' | 'pyqt5' | 'pyside' | 'pyside2' | 'pyqtdefault']
121-
Which module to check for
118+
Parameters
119+
----------
120+
api : str [ 'pyqtv1' | 'pyqt' | 'pyqt5' | 'pyside' | 'pyside2' | 'pyqtdefault']
121+
Which module to check for
122122
123-
Returns
124-
-------
125-
True if the relevant module appears to be importable
126-
"""
123+
Returns
124+
-------
125+
True if the relevant module appears to be importable
126+
"""
127127
module_name = api_to_module[api]
128128
from importlib.util import find_spec
129129

@@ -193,9 +193,8 @@ def import_pyqt4(version=2):
193193
Parameters
194194
----------
195195
version : 1, 2, or None
196-
Which QString/QVariant API to use. Set to None to use the system
197-
default
198-
196+
Which QString/QVariant API to use. Set to None to use the system
197+
default
199198
ImportErrors raised within this function are non-recoverable
200199
"""
201200
# The new-style string API (version=2) automatically
@@ -319,13 +318,12 @@ def load_qt(api_options):
319318
320319
Parameters
321320
----------
322-
api_options: List of strings
321+
api_options : List of strings
323322
The order of APIs to try. Valid items are 'pyside', 'pyside2',
324323
'pyqt', 'pyqt5', 'pyqtv1' and 'pyqtdefault'
325324
326325
Returns
327326
-------
328-
329327
A tuple of QtCore, QtGui, QtSvg, QT_API
330328
The first three are the Qt modules. The last is the
331329
string indicating which module was loaded.

IPython/lib/backgroundjobs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def new(self, func_or_exp, *args, **kwargs):
116116
The given expression is passed to eval(), along with the optional
117117
global/local dicts provided. If no dicts are given, they are
118118
extracted automatically from the caller's frame.
119-
119+
120120
A Python statement is NOT a valid eval() expression. Basically, you
121121
can only use as an eval() argument something which can go on the right
122122
of an '=' sign and be assigned to a variable.

IPython/lib/demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def __init__(self,src,title='',arg_str='',auto_all=None, format_rst=False,
239239
terminal16m
240240
241241
- style('default'): a string of pygments style name to be used.
242-
"""
242+
"""
243243
if hasattr(src, "read"):
244244
# It seems to be a file or a file-like object
245245
self.fname = "from a file-like object"

IPython/lib/display.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -517,20 +517,20 @@ def _get_display_formatter(self,
517517
fp_cleaner=None):
518518
""" generate built-in formatter function
519519
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
522-
523-
dirname_output_format: string to use for formatting directory
524-
names, dirname will be substituted for a single "%s" which
525-
must appear in this string
526-
fname_output_format: string to use for formatting file names,
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
529-
substituted for the first and fname will be substituted for the
530-
second
531-
fp_format: string to use for formatting filepaths, must contain
532-
exactly two "%s" and the dirname will be substituted for the first
533-
and fname will be substituted for the second
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
522+
523+
dirname_output_format: string to use for formatting directory
524+
names, dirname will be substituted for a single "%s" which
525+
must appear in this string
526+
fname_output_format: string to use for formatting file names,
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
529+
substituted for the first and fname will be substituted for the
530+
second
531+
fp_format: string to use for formatting filepaths, must contain
532+
exactly two "%s" and the dirname will be substituted for the first
533+
and fname will be substituted for the second
534534
"""
535535
def f(dirname, fnames, included_suffixes=None):
536536
result = []

IPython/lib/latextools.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ def latex_to_png(s, encode=False, backend=None, wrap=False, color='Black',
7777
format, e.g. '#AA20FA'.
7878
scale : float
7979
Scale factor for the resulting PNG.
80-
8180
None is returned when the backend cannot be used.
8281
8382
"""

0 commit comments

Comments
 (0)