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

12 statements  

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

1"""The ``pyshacl`` import name, served by pyshacl-turbo (ADR 0049). 

2 

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

4``PYSHACL_TURBO_ALIAS=0`` or ``TURBO_ALIAS=0`` is set. ``pyshacl.__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 pyshacl_turbo import RuleExpandRunner, Shape, ShapesGraph, Validator 

11from pyshacl_turbo.compat.entrypoints import shacl_rules, validate, validate_each 

12 

13PYSHACL_API_VERSION = "0.40.2" 

14"""The pinned pySHACL release whose public surface this package mirrors.""" 

15 

16__version__ = PYSHACL_API_VERSION 

17"""Version checks written against pySHACL compare with the mirrored API version.""" 

18 

19__turbo__ = True 

20"""Marker that ``pyshacl`` is served by pyshacl-turbo; the real pySHACL has no such attribute.""" 

21 

22__turbo_version__ = version("pyshacl-turbo") 

23"""The installed pyshacl-turbo version.""" 

24 

25__all__ = [ 

26 "RuleExpandRunner", 

27 "Shape", 

28 "ShapesGraph", 

29 "Validator", 

30 "__version__", 

31 "shacl_rules", 

32 "validate", 

33 "validate_each", 

34]