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