Skip to content

Commit bb06ed1

Browse files
committed
Wrap >88 lines, and make quoting more consistent
1 parent 21ffae9 commit bb06ed1

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/scyjava/_introspect.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""
2-
Introspection functions for reporting java class 'methods', 'fields', and source code URL.
2+
Introspection functions for reporting Java
3+
class methods, fields, and source code URL.
34
"""
45

56
from functools import partial
@@ -15,7 +16,7 @@ def jreflect(data, aspect: str) -> List[Dict[str, Any]]:
1516
returning a table of its available methods or fields.
1617
1718
:param data: The object or class or fully qualified class name to inspect.
18-
:param aspect: Either 'methods' or 'fields'
19+
:param aspect: Either "methods" or "fields"
1920
:return: List of dicts with keys: "name", "static", "arguments", and "returns".
2021
"""
2122

@@ -33,7 +34,7 @@ def jreflect(data, aspect: str) -> List[Dict[str, Any]]:
3334
elif aspect == "fields":
3435
cls_aspects = jcls.getFields()
3536
else:
36-
return "`aspect` must be either 'fields' or 'methods'"
37+
return '`aspect` must be either "fields" or "methods"'
3738

3839
table = []
3940

@@ -114,7 +115,8 @@ def _make_pretty_string(entry, offset):
114115
def java_source(data):
115116
"""
116117
Try to find the source code using SciJava's SourceFinder.
117-
:param data: The object or class or fully qualified class name to check for source code.
118+
:param data:
119+
The object or class or fully qualified class name to check for source code.
118120
:return: The URL of the java class
119121
"""
120122
types = jimport("org.scijava.util.Types")
@@ -149,8 +151,10 @@ def _print_data(data, aspect, static: Optional[bool] = None, source: bool = True
149151
arguments, and return values.
150152
151153
:param data: The object or class to inspect or fully qualified class name.
152-
:param aspect: Whether to print class 'fields' or 'methods'.
153-
:param static: Boolean filter on Static or Instance methods. Optional, default is None (prints all).
154+
:param aspect: Whether to print class "fields" or "methods".
155+
:param static:
156+
Boolean filter on Static or Instance methods.
157+
Optional, default is None (prints all).
154158
:param source: Whether to print any available source code. Default True.
155159
"""
156160
table = jreflect(data, aspect)

0 commit comments

Comments
 (0)