Skip to content

Commit

Permalink
Satisfy static checkers.
Browse files Browse the repository at this point in the history
  • Loading branch information
zuckerruebe committed Oct 17, 2023
1 parent 9999566 commit db590c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions trnsysGUI/console.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
__all__ = ["QtConsoleWidget"]

import pathlib as _pl
import sys as _sys
import typing as _tp

import ipykernel.kernelspec as _ipyksp
import jupyter_client.kernelspec as _jcksp
import qtconsole.client as _qtcc
import qtconsole.manager as _qtcm
import qtconsole.rich_jupyter_widget as _qtcjw
import sys as _sys

import trnsysGUI.pyinstaller as _pyinst

Expand Down Expand Up @@ -56,10 +56,10 @@ def get_kernel_spec(self, kernel_name: str) -> _jcksp.KernelSpec:
if kernel_name != _jcksp.NATIVE_KERNEL_NAME:
raise _jcksp.NoSuchKernel(kernel_name)

return _jcksp.KernelSpec(_ipyksp.RESOURCES, **_get_kernel_dict())
return _jcksp.KernelSpec(_ipyksp.RESOURCES, **_getKernelDict())

def get_all_specs(self) -> _tp.Mapping[str, _tp.Mapping[str, str]]:
return {_jcksp.NATIVE_KERNEL_NAME: {"resource_dir": _ipyksp.RESOURCES, "spec": _get_kernel_dict()}}
def get_all_specs(self) -> _tp.Mapping[str, _tp.Any]:
return {_jcksp.NATIVE_KERNEL_NAME: {"resource_dir": _ipyksp.RESOURCES, "spec": _getKernelDict()}}

def find_kernel_specs(self) -> _tp.Mapping[str, str]:
return {_jcksp.NATIVE_KERNEL_NAME: _ipyksp.RESOURCES}
Expand All @@ -74,7 +74,7 @@ def install_native_kernel_spec(self, user=False):
raise NotImplementedError()


def _get_kernel_dict() -> _tp.Mapping[str, str]:
def _getKernelDict() -> _tp.Mapping[str, _tp.Any]:
if _pyinst.isRunAsPyInstallerExe():
dirContainingExes = _pl.Path(_sys.executable).parent
ipykernelLauncherExePath = dirContainingExes / "launchIPythonKernel.exe"
Expand Down
2 changes: 1 addition & 1 deletion trnsysGUI/gui.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import logging as _log
import multiprocessing as _mp
import pathlib as _pl
import sys as _sys

import PyQt5.QtWidgets as _qtw
import sys as _sys

import pytrnsys.utils.log as _ulog
import pytrnsys.utils.result as _res
Expand Down

0 comments on commit db590c2

Please sign in to comment.