Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
suppress
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Sep 1, 2023
1 parent d17f988 commit 6a77d67
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/flash/core/utilities/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import contextlib
import functools
import importlib
import operator
Expand All @@ -19,6 +20,7 @@

from lightning_utilities.core.imports import compare_version, module_available
from pkg_resources import DistributionNotFound
from typeshed_client.typeshed.contextlib import suppress

try:
from packaging.version import Version
Expand All @@ -41,7 +43,8 @@
_MATPLOTLIB_AVAILABLE = module_available("matplotlib")
_TRANSFORMERS_AVAILABLE = module_available("transformers")
_PYSTICHE_AVAILABLE = module_available("pystiche")
_FIFTYONE_AVAILABLE = module_available("fiftyone")
with contextlib.suppress(ConnectionError):
_FIFTYONE_AVAILABLE = module_available("fiftyone")
_FASTAPI_AVAILABLE = module_available("fastapi")
_PYDANTIC_AVAILABLE = module_available("pydantic")
_GRAPHVIZ_AVAILABLE = module_available("graphviz")
Expand Down

0 comments on commit 6a77d67

Please sign in to comment.