Skip to content

Commit 30bd4d3

Browse files
committed
Hide non-public scijava.config attrs
1 parent 92d7fb1 commit 30bd4d3

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

src/scyjava/config.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
import enum
2-
import logging
3-
import os
4-
import pathlib
1+
import enum as _enum
2+
import logging as _logging
3+
import os as _os
4+
import pathlib as _pathlib
55

6-
import jpype
7-
from jgo import maven_scijava_repository
6+
import jpype as _jpype
7+
from jgo import maven_scijava_repository as _scijava_public
88

9-
_logger = logging.getLogger(__name__)
9+
10+
_logger = _logging.getLogger(__name__)
1011

1112
endpoints = []
12-
_repositories = {"scijava.public": maven_scijava_repository()}
13+
14+
_repositories = {"scijava.public": _scijava_public()}
1315
_verbose = 0
1416
_manage_deps = True
15-
_cache_dir = pathlib.Path.home() / ".jgo"
16-
_m2_repo = pathlib.Path.home() / ".m2" / "repository"
17+
_cache_dir = _pathlib.Path.home() / ".jgo"
18+
_m2_repo = _pathlib.Path.home() / ".m2" / "repository"
1719
_options = []
1820
_shortcuts = {}
1921

2022

21-
class Mode(enum.Enum):
23+
class Mode(_enum.Enum):
2224
JEP = "jep"
2325
JPYPE = "jpype"
2426

@@ -143,7 +145,7 @@ def add_classpath(*path):
143145
foo.bar.Fubar.
144146
"""
145147
for p in path:
146-
jpype.addClassPath(p)
148+
_jpype.addClassPath(p)
147149

148150

149151
def find_jars(directory):
@@ -154,16 +156,16 @@ def find_jars(directory):
154156
:return: a list of JAR files
155157
"""
156158
jars = []
157-
for root, _, files in os.walk(directory):
159+
for root, _, files in _os.walk(directory):
158160
for f in files:
159161
if f.lower().endswith(".jar"):
160-
path = os.path.join(root, f)
162+
path = _os.path.join(root, f)
161163
jars.append(path)
162164
return jars
163165

164166

165167
def get_classpath():
166-
return jpype.getClassPath()
168+
return _jpype.getClassPath()
167169

168170

169171
def set_heap_min(mb: int = None, gb: int = None):

0 commit comments

Comments
 (0)