Skip to content

Commit

Permalink
need to not return None
Browse files Browse the repository at this point in the history
  • Loading branch information
majidaldo committed Jan 5, 2025
1 parent 4cffe3d commit d67ef46
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/pytqshacl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "129"
__version__ = "130"
from .topquadrant import ver as tq_ver
topquadrant_version = tq_ver
from .run import validate, infer
14 changes: 7 additions & 7 deletions src/pytqshacl/topquadrant/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@ def get_existing_java():
@classmethod
def get(cls, *, prefer_existing=prefer_sysjava, **kw):
if prefer_existing:
ej = cls.get_existing_java()
if ej: return ej
else:
return cls(**kw).bin
_ = cls.get_existing_java()
if _: return _
return cls(**kw).bin

class defaults:
ver = '21'
jre = True
def __init__(self, ver: str=defaults.ver, jre: bool=defaults.jre):
self.ver = ver
self.jre = jre
self.install(ver, jre)
self.install()

def install(self, ver: str, jre: bool):
def install(self,):
if not self.dir:
try:
import jdk
except ModuleNotFoundError:
raise ModuleNotFoundError("can't install java. did you intend to install the feature pytqshacl[java]?")
print('installing java to')
jdk.install(ver, jre=jre)
_ = jdk.install(self.ver, jre=self.jre)
print(str(self.bin))
return _


@property
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d67ef46

Please sign in to comment.