Skip to content

Commit

Permalink
minor code reformating valid ruff 0.9.6 (#1330)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau authored Feb 13, 2025
1 parent a2f3d4b commit 3d4df3b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions ipykernel/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ def connect_qtconsole(


__all__ = [
"write_connection_file",
"connect_qtconsole",
"get_connection_file",
"get_connection_info",
"connect_qtconsole",
"write_connection_file",
]
12 changes: 7 additions & 5 deletions ipykernel/iostream.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,11 +501,13 @@ def __init__(
self._local = local()

if (
watchfd
and (
(sys.platform.startswith("linux") or sys.platform.startswith("darwin"))
# Pytest set its own capture. Don't redirect from within pytest.
and ("PYTEST_CURRENT_TEST" not in os.environ)
(
watchfd
and (
(sys.platform.startswith("linux") or sys.platform.startswith("darwin"))
# Pytest set its own capture. Don't redirect from within pytest.
and ("PYTEST_CURRENT_TEST" not in os.environ)
)
)
# allow forcing watchfd (mainly for tests)
or watchfd == "force"
Expand Down
1 change: 0 additions & 1 deletion tests/test_message_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def _setup_env():


class Reference(HasTraits):

"""
Base class for message spec specification testing.
Expand Down
4 changes: 2 additions & 2 deletions tests/test_subshells.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ def test_run_concurrently_sequence(are_subshells, overlap):
if overlap:
codes = [
f"b.wait(); start0=True; end0=False; time.sleep({sleep}); end0=True",
f"b.wait(); time.sleep({sleep/2}); assert start0; assert not end0; time.sleep({sleep}); assert end0",
f"b.wait(); time.sleep({sleep / 2}); assert start0; assert not end0; time.sleep({sleep}); assert end0",
]
else:
codes = [
f"b.wait(); start0=True; end0=False; time.sleep({sleep}); assert end1",
f"b.wait(); time.sleep({sleep/2}); assert start0; assert not end0; end1=True",
f"b.wait(); time.sleep({sleep / 2}); assert start0; assert not end0; end1=True",
]

msgs = []
Expand Down

0 comments on commit 3d4df3b

Please sign in to comment.