| 1 |
from typing import Optional |
| 2 |
|
| 3 |
from syrupy.types import SerializedData |
| 4 |
|
| 5 |
|
| 6 |
class SnapshotDoesNotExist(Exception): |
| 7 |
"""Snapshot does not exist""" |
| 8 |
|
| 9 |
|
| 10 |
class FailedToLoadModuleMember(Exception): |
| 11 |
"""Failed to load specific member in a module""" |
| 12 |
|
| 13 |
|
| 14 |
class TaintedSnapshotError(Exception): |
| 15 |
"""The snapshot needs to be regenerated.""" |
| 16 |
|
| 17 |
snapshot_data: Optional["SerializedData"] |
| 18 |
|
| 19 |
def __init__(self, snapshot_data: Optional["SerializedData"] = None) -> None: |
| 20 |
super().__init__() |
| 21 |
self.snapshot_data = snapshot_data |