##// END OF EJS Templates
typo and reformat
Matthias Bussonnier -
Show More
@@ -40,7 +40,8 b' See IPython `README.rst` file for more information:'
40
40
41 https://github.com/ipython/ipython/blob/master/README.rst
41 https://github.com/ipython/ipython/blob/master/README.rst
42
42
43 """)
43 """
44 )
44
45
45 #-----------------------------------------------------------------------------
46 #-----------------------------------------------------------------------------
46 # Setup the top level names
47 # Setup the top level names
1 NO CONTENT: modified file
NO CONTENT: modified file
@@ -589,7 +589,7 b' class Completer(Configurable):'
589
589
590 This will enable completion on elements of lists, results of function calls, etc.,
590 This will enable completion on elements of lists, results of function calls, etc.,
591 but can be unsafe because the code is actually evaluated on TAB.
591 but can be unsafe because the code is actually evaluated on TAB.
592 """
592 """,
593 ).tag(config=True)
593 ).tag(config=True)
594
594
595 use_jedi = Bool(default_value=JEDI_INSTALLED,
595 use_jedi = Bool(default_value=JEDI_INSTALLED,
@@ -166,7 +166,7 b' class HistoryAccessor(HistoryAccessorBase):'
166 in which case there will be no stored history, no SQLite connection,
166 in which case there will be no stored history, no SQLite connection,
167 and no background saving thread. This may be necessary in some
167 and no background saving thread. This may be necessary in some
168 threaded environments where IPython is embedded.
168 threaded environments where IPython is embedded.
169 """
169 """,
170 ).tag(config=True)
170 ).tag(config=True)
171
171
172 connection_options = Dict(
172 connection_options = Dict(
@@ -213,7 +213,9 b' class ExecutionInfo(object):'
213 raw_cell = (
213 raw_cell = (
214 (self.raw_cell[:50] + "..") if len(self.raw_cell) > 50 else self.raw_cell
214 (self.raw_cell[:50] + "..") if len(self.raw_cell) > 50 else self.raw_cell
215 )
215 )
216 return '<%s object at %x, raw_cell="%s" store_history=%s silent=%s shell_futures=%s cell_id=%s>' % (
216 return (
217 '<%s object at %x, raw_cell="%s" store_history=%s silent=%s shell_futures=%s cell_id=%s>'
218 % (
217 name,
219 name,
218 id(self),
220 id(self),
219 raw_cell,
221 raw_cell,
@@ -222,6 +224,7 b' class ExecutionInfo(object):'
222 self.shell_futures,
224 self.shell_futures,
223 self.cell_id,
225 self.cell_id,
224 )
226 )
227 )
225
228
226
229
227 class ExecutionResult(object):
230 class ExecutionResult(object):
1 NO CONTENT: modified file
NO CONTENT: modified file
@@ -58,8 +58,8 b' def script_args(f):'
58 '--no-raise-error', action="store_false", dest='raise_error',
58 '--no-raise-error', action="store_false", dest='raise_error',
59 help="""Whether you should raise an error message in addition to
59 help="""Whether you should raise an error message in addition to
60 a stream on stderr if you get a nonzero exit code.
60 a stream on stderr if you get a nonzero exit code.
61 """
61 """,
62 )
62 ),
63 ]
63 ]
64 for arg in args:
64 for arg in args:
65 f = arg(f)
65 f = arg(f)
@@ -87,7 +87,8 b' g()'
87
87
88 #####
88 #####
89
89
90 MULTILINE_SYSTEM_ASSIGN_AFTER_DEDENT = ("""\
90 MULTILINE_SYSTEM_ASSIGN_AFTER_DEDENT = (
91 """\
91 def test():
92 def test():
92 for i in range(1):
93 for i in range(1):
93 print(i)
94 print(i)
@@ -547,7 +547,7 b' class TestSafeExecfileNonAsciiPath(unittest.TestCase):'
547 self.TESTDIR = join(self.BASETESTDIR, u"åäö")
547 self.TESTDIR = join(self.BASETESTDIR, u"åäö")
548 os.mkdir(self.TESTDIR)
548 os.mkdir(self.TESTDIR)
549 with open(
549 with open(
550 join(self.TESTDIR, u"åäötestscript.py"), "w", encoding="utf-8"
550 join(self.TESTDIR, "åäötestscript.py"), "w", encoding="utf-8"
551 ) as sfile:
551 ) as sfile:
552 sfile.write("pass\n")
552 sfile.write("pass\n")
553 self.oldpath = os.getcwd()
553 self.oldpath = os.getcwd()
@@ -236,7 +236,8 b' def test_run_cell():'
236 if 4:
236 if 4:
237 print "bar"
237 print "bar"
238
238
239 """)
239 """
240 )
240 # Simply verifies that this kind of input is run
241 # Simply verifies that this kind of input is run
241 ip.run_cell(complex)
242 ip.run_cell(complex)
242
243
@@ -448,7 +448,9 b' def test_multiline_time():'
448 ip = get_ipython()
448 ip = get_ipython()
449 ip.user_ns.pop('run', None)
449 ip.user_ns.pop('run', None)
450
450
451 ip.run_cell(dedent("""\
451 ip.run_cell(
452 dedent(
453 """\
452 %%time
454 %%time
453 a = "ho"
455 a = "ho"
454 b = "hey"
456 b = "hey"
@@ -122,7 +122,8 b' class PasteTestCase(TestCase):'
122 ip.user_ns.pop("x")
122 ip.user_ns.pop("x")
123
123
124 def test_paste_py_multi(self):
124 def test_paste_py_multi(self):
125 self.paste("""
125 self.paste(
126 """
126 >>> x = [1,2,3]
127 >>> x = [1,2,3]
127 >>> y = []
128 >>> y = []
128 >>> for i in x:
129 >>> for i in x:
@@ -145,7 +146,8 b' class PasteTestCase(TestCase):'
145
146
146 def test_paste_email(self):
147 def test_paste_email(self):
147 "Test pasting of email-quoted contents"
148 "Test pasting of email-quoted contents"
148 self.paste("""\
149 self.paste(
150 """\
149 >> def foo(x):
151 >> def foo(x):
150 >> return x + 1
152 >> return x + 1
151 >> xx = foo(1.1)"""
153 >> xx = foo(1.1)"""
@@ -154,7 +156,8 b' class PasteTestCase(TestCase):'
154
156
155 def test_paste_email2(self):
157 def test_paste_email2(self):
156 "Email again; some programs add a space also at each quoting level"
158 "Email again; some programs add a space also at each quoting level"
157 self.paste("""\
159 self.paste(
160 """\
158 > > def foo(x):
161 > > def foo(x):
159 > > return x + 1
162 > > return x + 1
160 > > yy = foo(2.1) """
163 > > yy = foo(2.1) """
@@ -163,7 +166,8 b' class PasteTestCase(TestCase):'
163
166
164 def test_paste_email_py(self):
167 def test_paste_email_py(self):
165 "Email quoting of interactive input"
168 "Email quoting of interactive input"
166 self.paste("""\
169 self.paste(
170 """\
167 >> >>> def f(x):
171 >> >>> def f(x):
168 >> ... return x+1
172 >> ... return x+1
169 >> ...
173 >> ...
@@ -108,7 +108,7 b' def test_list_profiles_in():'
108 for name in ("profile_foo", "profile_hello", "not_a_profile"):
108 for name in ("profile_foo", "profile_hello", "not_a_profile"):
109 Path(td / name).mkdir(parents=True)
109 Path(td / name).mkdir(parents=True)
110 if dec.unicode_paths:
110 if dec.unicode_paths:
111 Path(td / u"profile_ünicode").mkdir(parents=True)
111 Path(td / "profile_ünicode").mkdir(parents=True)
112
112
113 with open(td / "profile_file", "w", encoding="utf-8") as f:
113 with open(td / "profile_file", "w", encoding="utf-8") as f:
114 f.write("I am not a profile directory")
114 f.write("I am not a profile directory")
@@ -66,7 +66,9 b' class ImportDenier(importlib.abc.MetaPathFinder):'
66 """
66 """
67 Importing %s disabled by IPython, which has
67 Importing %s disabled by IPython, which has
68 already imported an Incompatible QT Binding: %s
68 already imported an Incompatible QT Binding: %s
69 """ % (fullname, loaded_api()))
69 """
70 % (fullname, loaded_api())
71 )
70
72
71
73
72 ID = ImportDenier()
74 ID = ImportDenier()
@@ -104,7 +104,7 b' class Audio(DisplayObject):'
104 --------
104 --------
105 ipywidgets.Audio
105 ipywidgets.Audio
106
106
107 AUdio widget with more more flexibility and options.
107 Audio widget with more more flexibility and options.
108
108
109 """
109 """
110 _read_flags = 'rb'
110 _read_flags = 'rb'
@@ -510,11 +510,9 b' class FileLinks(FileLink):'
510
510
511 self.recursive = recursive
511 self.recursive = recursive
512
512
513 def _get_display_formatter(self,
513 def _get_display_formatter(
514 dirname_output_format,
514 self, dirname_output_format, fname_output_format, fp_format, fp_cleaner=None
515 fname_output_format,
515 ):
516 fp_format,
517 fp_cleaner=None):
518 """ generate built-in formatter function
516 """generate built-in formatter function
519
517
520 this is used to define both the notebook and terminal built-in
518 this is used to define both the notebook and terminal built-in
@@ -31,7 +31,7 b' def no_op(*args, **kwargs):'
31
31
32
32
33 @onlyif_cmds_exist("latex", "dvipng")
33 @onlyif_cmds_exist("latex", "dvipng")
34 @pytest.mark.parametrize("s, wrap", [(u"$$x^2$$", False), (u"x^2", True)])
34 @pytest.mark.parametrize("s, wrap", [("$$x^2$$", False), ("x^2", True)])
35 def test_latex_to_png_dvipng_runs(s, wrap):
35 def test_latex_to_png_dvipng_runs(s, wrap):
36 """
36 """
37 Test that latex_to_png_dvipng just runs without error.
37 Test that latex_to_png_dvipng just runs without error.
@@ -273,7 +273,7 b' def test_unicode_repr():'
273 p = pretty.pretty(c)
273 p = pretty.pretty(c)
274 assert p == u
274 assert p == u
275 p = pretty.pretty([c])
275 p = pretty.pretty([c])
276 assert p == u"[%s]" % u
276 assert p == "[%s]" % u
277
277
278
278
279 def test_basic_class():
279 def test_basic_class():
1 NO CONTENT: modified file
NO CONTENT: modified file
1 NO CONTENT: modified file
NO CONTENT: modified file
@@ -690,7 +690,7 b' def compute_item_matrix(items, row_first=False, empty=None, *args, **kwargs) :'
690 return ([[_get_or_default(items, c * nrow + r, default=empty) for c in range(ncol)] for r in range(nrow)], info)
690 return ([[_get_or_default(items, c * nrow + r, default=empty) for c in range(ncol)] for r in range(nrow)], info)
691
691
692
692
693 def columnize(items, row_first=False, separator=' ', displaywidth=80, spread=False):
693 def columnize(items, row_first=False, separator=" ", displaywidth=80, spread=False):
694 """ Transform a list of strings into a single string with columns.
694 """Transform a list of strings into a single string with columns.
695
695
696 Parameters
696 Parameters
General Comments 0
You need to be logged in to leave comments. Login now