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:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user