Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4f4f326

Browse filesBrowse files
committed
Fix lint
1 parent eb7ec04 commit 4f4f326
Copy full SHA for 4f4f326

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed

‎Lib/traceback.py

Copy file name to clipboardExpand all lines: Lib/traceback.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,13 +1277,13 @@ def format_exception_only(self, *, show_group=False, _depth=0, **kwargs):
12771277
if self.exceptions and show_group:
12781278
for ex in self.exceptions:
12791279
yield from ex.format_exception_only(show_group=show_group, _depth=_depth+1, colorize=colorize)
1280-
1280+
12811281
def _find_keyword_typos(self):
12821282
try:
12831283
import _suggestions
12841284
except ImportError:
12851285
return
1286-
1286+
12871287
assert self._is_syntax_error
12881288

12891289
# Only try to find keyword typos if there is no custom message
@@ -1292,7 +1292,7 @@ def _find_keyword_typos(self):
12921292

12931293
if not self._exc_metadata:
12941294
return
1295-
1295+
12961296
line, offset, source = self._exc_metadata
12971297
end_line = int(self.lineno) if self.lineno is not None else 0
12981298
lines = None
@@ -1310,7 +1310,7 @@ def _find_keyword_typos(self):
13101310
lines = lines if lines is not None else self.text.splitlines()
13111311
else:
13121312
lines = source.splitlines()
1313-
1313+
13141314
error_code = lines[line -1 if line > 0 else 0:end_line]
13151315
error_code[0] = error_code[0][offset:]
13161316
error_code = textwrap.dedent(''.join(error_code))
@@ -1356,7 +1356,7 @@ def _find_keyword_typos(self):
13561356
self.end_lineno = end[0]
13571357
self.msg = f"invalid syntax. Did you mean '{suggestion}'?"
13581358
return
1359-
1359+
13601360

13611361
def _format_syntax_error(self, stype, **kwargs):
13621362
"""Format SyntaxError exceptions (internal helper)."""

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.