Skip to content

Commit bacd767

Browse files
Auto-format: ruff format
1 parent 6a08dcd commit bacd767

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

extra_tests/snippets/builtin_exceptions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,9 @@ class SubError(MyError):
275275
# Extends `BaseException`, complex - has its own __init__:
276276
# CPython's SystemExit_init sets self->code based on args length
277277
assert SystemExit.__init__.__qualname__ == "SystemExit.__init__"
278-
assert SystemExit.__dict__.get("__init__") is not None, "SystemExit must have its own __init__"
278+
assert SystemExit.__dict__.get("__init__") is not None, (
279+
"SystemExit must have its own __init__"
280+
)
279281
assert SystemExit.__init__ is not BaseException.__init__
280282
assert SystemExit().__dict__ == {}
281283
# SystemExit.code behavior:

extra_tests/snippets/code_co_consts.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ def with_doc():
1717
return 1
1818

1919

20-
assert with_doc.__code__.co_consts[0] == "This is a docstring", with_doc.__code__.co_consts
20+
assert with_doc.__code__.co_consts[0] == "This is a docstring", (
21+
with_doc.__code__.co_consts
22+
)
2123
assert with_doc.__doc__ == "This is a docstring"
2224
# Check CO_HAS_DOCSTRING flag (0x4000000)
2325
assert with_doc.__code__.co_flags & 0x4000000, hex(with_doc.__code__.co_flags)
@@ -42,7 +44,9 @@ async def async_with_doc():
4244
return 1
4345

4446

45-
assert async_with_doc.__code__.co_consts[0] == "Async docstring", async_with_doc.__code__.co_consts
47+
assert async_with_doc.__code__.co_consts[0] == "Async docstring", (
48+
async_with_doc.__code__.co_consts
49+
)
4650
assert async_with_doc.__doc__ == "Async docstring"
4751
assert async_with_doc.__code__.co_flags & 0x4000000
4852

0 commit comments

Comments
 (0)