Skip to content

Commit

Permalink
Add type to supported_features
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthomas23 committed Nov 18, 2024
1 parent 1cf373b commit 71217b3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ipykernel/kernelbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,23 +880,23 @@ async def connect_request(self, socket, ident, parent):

@property
def kernel_info(self):
from .debugger import _is_debugpy_available

info = {
"protocol_version": kernel_protocol_version,
"implementation": self.implementation,
"implementation_version": self.implementation_version,
"language_info": self.language_info,
"banner": self.banner,
"help_links": self.help_links,
"supported_features": [],
}
supported_features: list[str] = []
if self._supports_kernel_subshells:
info["supported_features"] = ["kernel subshells"]

from .debugger import _is_debugpy_available

supported_features.append("kernel subshells")
if _is_debugpy_available:
info["supported_features"].append("debugger")

supported_features.append("debugger")
if len(supported_features) > 0:
info["supported_features"] = supported_features
return info

async def kernel_info_request(self, socket, ident, parent):
Expand Down

0 comments on commit 71217b3

Please sign in to comment.