From b1d0ec967959136d753f0932cfa5f2a0e6499397 Mon Sep 17 00:00:00 2001 From: "i.nueske" <i.nueske@indiscale.com> Date: Wed, 12 Mar 2025 19:44:16 +0100 Subject: [PATCH 1/2] MNT: Suppress high_level_api import warning --- .../table_json_conversion/export_import_xlsx.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/caosadvancedtools/table_json_conversion/export_import_xlsx.py b/src/caosadvancedtools/table_json_conversion/export_import_xlsx.py index 0fe5d9d8..d41fe333 100644 --- a/src/caosadvancedtools/table_json_conversion/export_import_xlsx.py +++ b/src/caosadvancedtools/table_json_conversion/export_import_xlsx.py @@ -24,18 +24,24 @@ Utilities for automatically exporting and importing data to and from xlsx. import json import tempfile import warnings +import logging from typing import Union from pathlib import Path import linkahead from linkahead.common.models import Container from linkahead import execute_query -from linkahead.high_level_api import convert_to_python_object from ..json_schema_exporter import JsonSchemaExporter, merge_schemas from .table_generator import XLSXTemplateGenerator from .fill_xlsx import fill_template +# The high_level_api import would normally warn about the API being +# experimental. We know this, so suppress the warning. +logging.disable(logging.WARNING) +from linkahead.high_level_api import convert_to_python_object +logging.disable(logging.NOTSET) + def _generate_jsonschema_from_recordtypes(recordtypes: list, out_path: Union[str, Path] = None) -> dict: -- GitLab From aec14b4a192a66934e5ca817d8a756b45afc31a5 Mon Sep 17 00:00:00 2001 From: "i.nueske" <i.nueske@indiscale.com> Date: Wed, 12 Mar 2025 20:00:18 +0100 Subject: [PATCH 2/2] STY: Ignore style issue --- .../table_json_conversion/export_import_xlsx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/caosadvancedtools/table_json_conversion/export_import_xlsx.py b/src/caosadvancedtools/table_json_conversion/export_import_xlsx.py index d41fe333..ea18a374 100644 --- a/src/caosadvancedtools/table_json_conversion/export_import_xlsx.py +++ b/src/caosadvancedtools/table_json_conversion/export_import_xlsx.py @@ -39,7 +39,7 @@ from .fill_xlsx import fill_template # The high_level_api import would normally warn about the API being # experimental. We know this, so suppress the warning. logging.disable(logging.WARNING) -from linkahead.high_level_api import convert_to_python_object +from linkahead.high_level_api import convert_to_python_object # noqa: E402, pylint: disable=wrong-import-position logging.disable(logging.NOTSET) -- GitLab