Skip to content

Commit

Permalink
apply fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Sep 9, 2023
1 parent a8de547 commit 8378584
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Run Linters
run: |
- name: Run Linters
run: |
hatch run typing:test
hatch run lint:style
pipx run interrogate -vv .
Expand Down
2 changes: 1 addition & 1 deletion examples/embedding/inprocess_qtconsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def init_asyncio_patch():
asyncio implementation on Windows
Pick the older SelectorEventLoopPolicy on Windows
if the known-incompatible default policy is in use.
do this as early as possible to make it a low priority and overrideable
do this as early as possible to make it a low priority and overridable
ref: https://github.com/tornadoweb/tornado/issues/2608
FIXME: if/when tornado supports the defaults in asyncio,
remove and bump tornado requirement for py38
Expand Down
2 changes: 1 addition & 1 deletion examples/embedding/inprocess_terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def init_asyncio_patch():
asyncio implementation on Windows
Pick the older SelectorEventLoopPolicy on Windows
if the known-incompatible default policy is in use.
do this as early as possible to make it a low priority and overrideable
do this as early as possible to make it a low priority and overridable
ref: https://github.com/tornadoweb/tornado/issues/2608
FIXME: if/when tornado supports the defaults in asyncio,
remove and bump tornado requirement for py38
Expand Down
4 changes: 2 additions & 2 deletions ipykernel/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
raise e


# Required for backwards compatiblity
# Required for backwards compatibility
ROUTING_ID = getattr(zmq, "ROUTING_ID", None) or zmq.IDENTITY


Expand Down Expand Up @@ -644,7 +644,7 @@ async def richInspectVariables(self, message):
repr_data = {}
repr_metadata = {}
if not self.stopped_threads:
# The code did not hit a breakpoint, we use the intepreter
# The code did not hit a breakpoint, we use the interpreter
# to get the rich representation of the variable
result = get_ipython().user_expressions({var_name: var_name})[var_name]
if result.get("status", "error") == "ok":
Expand Down
2 changes: 1 addition & 1 deletion ipykernel/inprocess/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class InProcessChannel:
proxy_methods: List[object] = []

def __init__(self, client=None):
"""Initialze the channel."""
"""Initialize the channel."""
super().__init__()
self.client = client
self._is_alive = False
Expand Down
4 changes: 2 additions & 2 deletions ipykernel/iostream.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def fileno(self):

def _watch_pipe_fd(self):
"""
We've redirected standards steams 0 and 1 into a pipe.
We've redirected standards streams 0 and 1 into a pipe.
We need to watch in a thread and redirect them to the right places.
Expand Down Expand Up @@ -424,7 +424,7 @@ def __init__(
that will swap the give file descriptor for a pipe, read from the
pipe, and insert this into the current Stream.
isatty : bool (default, False)
Indication of whether this stream has termimal capabilities (e.g. can handle colors)
Indication of whether this stream has terminal capabilities (e.g. can handle colors)
"""
if pipe is not None:
Expand Down
2 changes: 1 addition & 1 deletion ipykernel/ipkernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def set_sigint_result():
# use add_callback for thread safety
self.io_loop.add_callback(set_sigint_result)

# set the custom sigint hander during this context
# set the custom sigint handler during this context
save_sigint = signal.signal(signal.SIGINT, handle_sigint)
try:
yield
Expand Down
2 changes: 1 addition & 1 deletion ipykernel/kernelapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def _init_asyncio_patch(self):
but it is still preferable to run the Selector in the main thread
instead of the background.
do this as early as possible to make it a low priority and overrideable
do this as early as possible to make it a low priority and overridable
ref: https://github.com/tornadoweb/tornado/issues/2608
Expand Down
2 changes: 1 addition & 1 deletion ipykernel/tests/test_eventloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def test_qt_enable_gui(kernel, capsys):
enable_gui(gui, kernel)
assert app == kernel.app

# Event loop intergration can be turned off.
# Event loop integration can be turned off.
enable_gui(None, kernel)
assert not hasattr(kernel, 'app')

Expand Down
2 changes: 1 addition & 1 deletion ipykernel/tests/test_message_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def test_oinfo_detail():
def test_oinfo_not_found():
flush_channels()

msg_id = KC.inspect("dne")
msg_id = KC.inspect("does_not_exist")
reply = get_reply(KC, msg_id, TIMEOUT)
validate_message(reply, "inspect_reply", msg_id)
content = reply["content"]
Expand Down
4 changes: 2 additions & 2 deletions ipykernel/tests/test_start_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ def test_ipython_start_kernel_userns():
cmd = dedent(
"""
from ipykernel.kernelapp import launch_new_instance
ns = {"tre": 123}
ns = {"custom": 123}
launch_new_instance(user_ns=ns)
"""
)

with setup_kernel(cmd) as client:
client.inspect("tre")
client.inspect("custom")
msg = client.get_shell_msg(timeout=TIMEOUT)
content = msg["content"]
assert content["found"]
Expand Down

0 comments on commit 8378584

Please sign in to comment.