Skip to content

Commit

Permalink
Suppress Pydantic warnings by default (#110)
Browse files Browse the repository at this point in the history
* Suppress warnings in model_dump() when called after put_object()

* Revert "Suppress warnings in model_dump() when called after put_object()"

This reverts commit e69019a.

* Suppress Pydantic warnings by default
  • Loading branch information
ehclark authored Dec 10, 2024
1 parent ddbfd42 commit 1cabcc2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/anyvar/anyvar.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import logging.config
import os
import pathlib
import warnings
from collections.abc import MutableMapping
from urllib.parse import urlparse

Expand All @@ -19,6 +20,10 @@
from anyvar.translate.vrs_python import VrsPythonTranslator
from anyvar.utils.types import VrsObject

# Suppress pydantic warnings unless otherwise indicated
if os.environ.get("ANYVAR_SHOW_PYDANTIC_WARNINGS", None) is None:
warnings.filterwarnings("ignore", module="pydantic")

# Configure logging from file or use default
logging_config_file = os.environ.get("ANYVAR_LOGGING_CONFIG", None)
if logging_config_file and pathlib.Path(logging_config_file).is_file():
Expand Down

0 comments on commit 1cabcc2

Please sign in to comment.