From eeb2bbb1c5c30e8e7413f8d06ca07a578ae8990f Mon Sep 17 00:00:00 2001 From: chavlin Date: Mon, 12 Feb 2024 12:44:25 -0600 Subject: [PATCH] coverage fixes --- src/yt_napari/_gui_utilities.py | 3 --- src/yt_napari/_tests/test_schema_manager.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/yt_napari/_gui_utilities.py b/src/yt_napari/_gui_utilities.py index 49a52cd..3bda5d8 100644 --- a/src/yt_napari/_gui_utilities.py +++ b/src/yt_napari/_gui_utilities.py @@ -345,7 +345,4 @@ def get_yt_metadata_container(): def _is_base_model_or_yt_obj(field_info: pydantic.fields.FieldInfo): ftype = field_info.annotation - ispydy = isinstance(ftype, pydantic.BaseModel) - if ispydy: - return ispydy return ftype in _data_model._data_model_list diff --git a/src/yt_napari/_tests/test_schema_manager.py b/src/yt_napari/_tests/test_schema_manager.py index cdf4e30..5d23615 100644 --- a/src/yt_napari/_tests/test_schema_manager.py +++ b/src/yt_napari/_tests/test_schema_manager.py @@ -23,7 +23,7 @@ def get_expected(prefix, vstring): # run again with defaults, should increment expected_file = get_expected(pfx, "0.0.2") - m.write_new_schema("any old string") + m.write_new_schema({"or a": "dictionary"}) assert expected_file.is_file() # test other increments