Files
revng-revng/python/revng/internal/api/invalidations.py
Giacomo Vercesi 942cf50735 python: create python wheels
Package revng's python code in two wheels: `revng` and `revng_internal`.
The revng wheel contains the
`revng.{pipeline_description,model,tupletree}` modules, while the
`revng_internal` one everything under `revng.internal`.
2023-12-12 14:52:22 +01:00

31 lines
696 B
Python

#
# This file is distributed under the MIT License. See LICENSE.md for details.
#
from dataclasses import dataclass
from typing import Generic, TypeVar
from ._capi import _api
from .utils import make_python_string
class Invalidations:
def __init__(self, invalidations=None):
if invalidations is None:
self._invalidations = _api.rp_invalidations_create()
else:
self._invalidations = invalidations
def __str__(self):
res = _api.rp_invalidations_serialize(self._invalidations)
return make_python_string(res)
T = TypeVar("T")
@dataclass
class ResultWithInvalidations(Generic[T]):
result: T
invalidations: Invalidations