diff --git a/jpype/_core.py b/jpype/_core.py index 3e2db229e..ca1191d01 100644 --- a/jpype/_core.py +++ b/jpype/_core.py @@ -108,19 +108,14 @@ def isJVMStarted(): return _jpype.isStarted() -def _hasClassPath(args: typing.Tuple[_PathOrStr, ...]) -> bool: +def _hasClassPath(args) -> bool: for i in args: if isinstance(i, str) and i.startswith('-Djava.class.path'): return True return False -def _handleClassPath( - classpath: typing.Union[ - _PathOrStr, - typing.Tuple[_PathOrStr, ...] - ], -) -> str: +def _handleClassPath(classpath) -> str: """ Return a classpath which represents the given tuple of classpath specifications """ @@ -163,7 +158,7 @@ def interactive(): def startJVM( *jvmargs: str, jvmpath: typing.Optional[_PathOrStr] = None, - classpath: typing.Optional[typing.Sequence[_PathOrStr], _PathOrStr] = None, + classpath: typing.Union[typing.Sequence[_PathOrStr], _PathOrStr, None] = None, ignoreUnrecognized: bool = False, convertStrings: bool = False, interrupt: bool = not interactive(), diff --git a/pyproject.toml b/pyproject.toml index ca01bd7eb..bc88e6a35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,6 +6,7 @@ module = [ "java.*", "jpypex.common", "jedi", + "jedi.access", ] ignore_missing_imports = true