Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update typings for traitlets 5.10.1 #60

Merged
merged 1 commit into from
Sep 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pytest_jupyter/echo_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def do_execute(
class EchoKernelApp(IPKernelApp):
"""An app for the echo kernel."""

kernel_class = EchoKernel
kernel_class = EchoKernel # type:ignore[assignment]


if __name__ == "__main__":
Expand Down
7 changes: 5 additions & 2 deletions pytest_jupyter/jupyter_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def jp_server_config():
}
else:
config = {}
return Config(config) # type:ignore[no-untyped-call]
return Config(config)


@pytest.fixture
Expand Down Expand Up @@ -210,7 +210,7 @@ def _configurable_serverapp(
root_dir=jp_root_dir,
**kwargs,
):
c = Config(config) # type:ignore[no-untyped-call]
c = Config(config)
c.NotebookNotary.db_file = ":memory:"

default_token = hexlify(os.urandom(4)).decode("ascii")
Expand Down Expand Up @@ -479,6 +479,9 @@ def match_url_to_resource(

def normalize_url(self, path: str) -> str:
"""Drop the base URL and make sure path leads with a /"""
if not self.parent:
msg = "Cannot normalize the url without a parent object"
raise ValueError(msg)
base_url = self.parent.base_url
# Remove base_url
if path.startswith(base_url):
Expand Down