Mock module that raises an error when plotly functions are called.
| 229 | |
| 230 | |
| 231 | class MockPlotlyModule: |
| 232 | """Mock module that raises an error when plotly functions are called.""" |
| 233 | |
| 234 | def __getattr__(self, name: str) -> Any: |
| 235 | def mock_function(*args, **kwargs): |
| 236 | raise ImportError(f"Plotly is required to use '{name}'. Install it with uv pip install plotly") |
| 237 | |
| 238 | return mock_function |