Skip to content

Commit 5f883f1

Browse files
committed
Fix type hints to work with Python 3.8
1 parent 37bd92e commit 5f883f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/scyjava/_introspect.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"""
44

55
from functools import partial
6-
from typing import Any
6+
from typing import Any, Dict, List, Optional
77

88
from scyjava._jvm import jimport
99
from scyjava._types import isjava, jinstance, jclass
1010

1111

12-
def find_java(data, aspect: str) -> list[dict[str, Any]]:
12+
def find_java(data, aspect: str) -> List[Dict[str, Any]]:
1313
"""
1414
Use Java reflection to introspect the given Java object,
1515
returning a table of its available methods.
@@ -143,7 +143,7 @@ def java_source(data):
143143
return f"Unexpected {err=}, {type(err)=}"
144144

145145

146-
def _print_data(data, aspect, static: bool | None = None, source: bool = True):
146+
def _print_data(data, aspect, static: Optional[bool] = None, source: bool = True):
147147
"""
148148
Writes data to a printed string of class methods with inputs, static modifier, arguments, and return values.
149149

0 commit comments

Comments
 (0)