Skip to content

Commit

Permalink
fix: update stacklevel for deprecation warning (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 authored Jul 16, 2023
1 parent 8c220b4 commit acad714
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ome_types/_mixins/_base_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def __init__(self, **data: Any) -> None:
if extra and warn_extra:
warnings.warn(
f"Unrecognized fields for type {type(self)}: {kwargs - field_names}",
stacklevel=2,
stacklevel=3,
)

def __init_subclass__(cls) -> None:
Expand Down
1 change: 1 addition & 0 deletions tests/test_paquo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
pytest.skip("Paquo not installed", allow_module_level=True)


@pytest.mark.filterwarnings("ignore::pydantic.warnings.PydanticDeprecatedSince20")
@pytest.mark.filterwarnings("ignore:Field 'm' is deprecated. Use 'ms' instead")
@pytest.mark.filterwarnings("ignore:Importing submodules from ome_types.model")
def test_to_ome_xml() -> None:
Expand Down

0 comments on commit acad714

Please sign in to comment.