Skip to content

Commit

Permalink
Merge pull request #1160 from jpype-project/mypy_fix
Browse files Browse the repository at this point in the history
Fix mypy.   Removed typing from private methods.
  • Loading branch information
Thrameos authored Dec 10, 2023
2 parents 19835e3 + 700ec37 commit 4471a27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
11 changes: 3 additions & 8 deletions jpype/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down Expand Up @@ -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(),
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module = [
"java.*",
"jpypex.common",
"jedi",
"jedi.access",
]
ignore_missing_imports = true

0 comments on commit 4471a27

Please sign in to comment.