Coverage for target/native-coverage/profiles/ed7d3b207b2343278478d0be29776579/project/.venv/lib/python3.13/site-packages/owlrl_turbo/compat/__init__.py: 100%

14 statements  

« prev     ^ index     » next       coverage.py v7.17.2, created at 2026-12-01 11:12 +0000

1"""The ``owlrl`` import name, served by owlrl-turbo (ADR 0014). 

2 

3``import owlrl`` resolves here through the start-up alias unless 

4``OWLRL_TURBO_ALIAS=0`` or ``TURBO_ALIAS=0`` is set. ``owlrl.__turbo__`` is 

5``True`` only on this package, so a program can always tell which engine it got. 

6""" 

7 

8from importlib.metadata import version 

9 

10from owlrl_turbo import ( 

11 AUTO, 

12 JSON, 

13 RDFA, 

14 RDFXML, 

15 TURTLE, 

16 DeductiveClosure, 

17 OWLRL_Semantics, 

18 RDFS_OWLRL_Semantics, 

19 RDFS_Semantics, 

20 interpret_owl_imports, 

21 return_closure_class, 

22) 

23from owlrl_turbo.compat._missing import missing_attribute 

24 

25OWLRL_API_VERSION = "7.6.2" 

26"""The pinned owlrl release whose public surface this package mirrors.""" 

27 

28__version__ = OWLRL_API_VERSION 

29"""Version checks written against owlrl compare with the mirrored API version.""" 

30 

31__turbo__ = True 

32"""Marker that ``owlrl`` is served by owlrl-turbo; the real owlrl has no such attribute.""" 

33 

34__turbo_version__ = version("owlrl-turbo") 

35"""The installed owlrl-turbo version.""" 

36 

37__all__ = [ 

38 "AUTO", 

39 "JSON", 

40 "RDFA", 

41 "RDFXML", 

42 "TURTLE", 

43 "DeductiveClosure", 

44 "OWLRL_Semantics", 

45 "RDFS_OWLRL_Semantics", 

46 "RDFS_Semantics", 

47 "__version__", 

48 "interpret_owl_imports", 

49 "return_closure_class", 

50] 

51 

52 

53def __getattr__(name: str) -> object: 

54 raise missing_attribute(__name__, name)