classgen: mute expected warning

This commit is contained in:
Johannes Kirschbauer
2025-09-30 15:37:22 +02:00
parent 750f502ac6
commit 5a026eaf57

View File

@@ -1,13 +1,10 @@
import argparse import argparse
import json import json
import logging
from collections.abc import Callable, Iterable from collections.abc import Callable, Iterable
from functools import partial from functools import partial
from pathlib import Path from pathlib import Path
from typing import Any from typing import Any
logger = logging.getLogger(__name__)
class Error(Exception): class Error(Exception):
pass pass
@@ -261,8 +258,6 @@ def generate_dataclass(
nested_class_name = f"""{class_name if class_name != root_class and not prop_info.get("title") else ""}{title_sanitized}""" nested_class_name = f"""{class_name if class_name != root_class and not prop_info.get("title") else ""}{title_sanitized}"""
if not prop_type and not union_variants and not enum_variants: if not prop_type and not union_variants and not enum_variants:
msg = f"Type not found for property {prop} {prop_info}.\nConverting to unknown type.\n"
logger.warning(msg)
prop_type = "Unknown" prop_type = "Unknown"
if union_variants: if union_variants: