Daniel Pyrathon a1d4aa66bc feat(order_utils.py): schema resolver cache (#1317)
* Implemented basic functionality for using cache layer of LocalRefResolver

* Use `importlib` instead of `imp`, since it's been deprecated. Legacy `load_module()` reloads modules even if they are already imported, causing tests to fail when run in non-deterministic ordering, so we replace it with `import_module()`
2018-11-30 12:59:37 -05:00

12 lines
247 B
Python

from typing import Any, Dict, Tuple
class RefResolver:
def resolve(self, url: str) -> Tuple[str, Dict]:
...
class ValidationError(Exception): pass
def validate(instance: Any, schema: Dict, cls=None, *args, **kwargs) -> None: pass