Merge pull request 'classgen: mute expected warning' (#5324) from mute-warning into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5324
This commit is contained in:
hsjobeki
2025-09-30 13:40:08 +00:00

View File

@@ -1,13 +1,10 @@
import argparse
import json
import logging
from collections.abc import Callable, Iterable
from functools import partial
from pathlib import Path
from typing import Any
logger = logging.getLogger(__name__)
class Error(Exception):
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}"""
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"
if union_variants: