Skip to content

Commit 389390c

Browse files
committed
some ruff fixes
1 parent 02d6ae0 commit 389390c

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

IPython/core/oinspect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ def format_mime(self, bundle: UnformattedBundle) -> Bundle:
633633
if isinstance(bundle["text/html"], (list, tuple)):
634634
# bundle['text/html'] is a list of (head, formatted body) pairs
635635
new_b["text/html"] = "\n".join(
636-
(f"<h1>{head}</h1>\n{body}" for (head, body) in bundle["text/html"])
636+
f"<h1>{head}</h1>\n{body}" for (head, body) in bundle["text/html"]
637637
)
638638

639639
for k in bundle.keys():

IPython/testing/plugin/pytest_ipdoctest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def runtest(self) -> None:
350350
assert self.runner is not None
351351
_check_all_skipped(self.dtest)
352352
self._disable_output_capturing_for_darwin()
353-
failures: List["doctest.DocTestFailure"] = []
353+
failures: List[doctest.DocTestFailure] = []
354354

355355
# exec(compile(..., "single", ...), ...) puts result in builtins._
356356
had_underscore_value = hasattr(builtins, "_")

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,12 +408,12 @@ extend-select = [
408408
# "UP020", # 15 [*] Use builtin `open`
409409
# "UP024", # 16 [*] Replace aliased errors with `OSError`
410410
# "UP025", # 91 [*] Remove unicode literals from strings
411-
# "UP028", # 3 Replace `yield` over `for` loop with `yield from`
412-
# "UP029", # 1 Unnecessary builtin import
411+
"UP028", # 3 Replace `yield` over `for` loop with `yield from`
412+
"UP029", # 1 Unnecessary builtin import
413413
# "UP030", # 28 Use implicit references for positional format fields
414414
# "UP031", #386 Use format specifiers instead of percent format
415415
# "UP032", # 75 [*] Use f-string instead of `format` call
416-
# "UP034", # 1 [*] Avoid extraneous parentheses
416+
"UP034", # 1 [*] Avoid extraneous parentheses
417417
# "UP035", # 1 [*] Import from `re` instead
418418
# "UP035", # 2 [*] Import from `typing` instead
419419
# "UP035", # 2 `typing.Type` is deprecated, use `type` instead
@@ -423,7 +423,7 @@ extend-select = [
423423
# "UP035", # 14 `typing.List` is deprecated, use `list` instead
424424
# "UP035", # 18 [*] Import from `collections.abc` instead
425425
# "UP036", # 3 Version block is outdated for minimum Python version
426-
# "UP037", # 1 [*] Remove quotes from type annotation
426+
"UP037", # 1 [*] Remove quotes from type annotation
427427
# "UP038", # 21 Use `X | Y` in `isinstance` call instead of `(X, Y)`
428428
# "YTT", # flake8-2020
429429
# "EXE", # flake8-executable

0 commit comments

Comments
 (0)