From 832dcbd3e81d61e9c923af82b3e694ad5a18baaa Mon Sep 17 00:00:00 2001 From: Karl Nelson Date: Sun, 10 Dec 2023 12:21:43 -0800 Subject: [PATCH 1/4] Attempt at fix --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) 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 From 60e68fec3455ab9f73ce9b79434c12f67b3c96f0 Mon Sep 17 00:00:00 2001 From: Karl Nelson Date: Sun, 10 Dec 2023 12:26:00 -0800 Subject: [PATCH 2/4] Another attempt --- jpype/_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jpype/_core.py b/jpype/_core.py index 3e2db229e..072e9ad85 100644 --- a/jpype/_core.py +++ b/jpype/_core.py @@ -163,7 +163,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(), From a0bc7c6ec324f23c8d8e7ece430dda32df98e742 Mon Sep 17 00:00:00 2001 From: Karl Nelson Date: Sun, 10 Dec 2023 12:28:29 -0800 Subject: [PATCH 3/4] Not sure --- jpype/_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jpype/_core.py b/jpype/_core.py index 072e9ad85..424b416ec 100644 --- a/jpype/_core.py +++ b/jpype/_core.py @@ -108,7 +108,7 @@ 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 From 700ec37a9fb54db9b1f3a444a5e21b95a985c2e3 Mon Sep 17 00:00:00 2001 From: Karl Nelson Date: Sun, 10 Dec 2023 12:35:05 -0800 Subject: [PATCH 4/4] Another attempt --- jpype/_core.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/jpype/_core.py b/jpype/_core.py index 424b416ec..ca1191d01 100644 --- a/jpype/_core.py +++ b/jpype/_core.py @@ -115,12 +115,7 @@ def _hasClassPath(args) -> bool: 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 """