From 500153381cab321982bec3b9cccb5c706a55a350 Mon Sep 17 00:00:00 2001 From: Tim Mensinger Date: Tue, 12 Nov 2024 13:22:06 +0100 Subject: [PATCH] Add pdbp import to optimagic/estimagic init files --- src/estimagic/__init__.py | 6 ++++++ src/optimagic/__init__.py | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/src/estimagic/__init__.py b/src/estimagic/__init__.py index 44a640486..056f823e4 100644 --- a/src/estimagic/__init__.py +++ b/src/estimagic/__init__.py @@ -1,6 +1,12 @@ +import contextlib import warnings from dataclasses import dataclass +try: + import pdbp # noqa: F401 +except ImportError: + contextlib.suppress(Exception) + from estimagic import utilities from estimagic.bootstrap import BootstrapResult, bootstrap from estimagic.estimate_ml import LikelihoodResult, estimate_ml diff --git a/src/optimagic/__init__.py b/src/optimagic/__init__.py index 28e912234..e1cbd6a3c 100644 --- a/src/optimagic/__init__.py +++ b/src/optimagic/__init__.py @@ -1,5 +1,12 @@ from __future__ import annotations +import contextlib + +try: + import pdbp # noqa: F401 +except ImportError: + contextlib.suppress(Exception) + from optimagic import constraints, mark, utilities from optimagic.algorithms import algos from optimagic.benchmarking.benchmark_reports import (