libs.utils.dictutil module¶
libs/utils/dictutil.py
- class libs.utils.dictutil.SubCommandLike¶
Bases:
Protocolplaceholder生成に必要なサブコマンド設定の最小インターフェース
- __init__(*args, **kwargs)¶
- aggregation_range: str¶
- always_argument: list[str]¶
- section: str¶
- to_dict(drop_items=None)¶
- Parameters:
drop_items (list[str] | None)
- Return type:
dict[str, Any]
- libs.utils.dictutil.merge_dicts(dict1, dict2)¶
辞書の内容をマージする
- Parameters:
dict1 (dict[Any, Any]) – 1つ目の辞書
dict2 (dict[Any, Any]) – 2つ目の辞書
- Returns:
マージされた辞書
- Return type:
dict
- libs.utils.dictutil.placeholder(subcom, m)¶
プレースホルダに使用する辞書を生成
- Parameters:
subcom (SubCommandLike) – サブコマンド設定
m (MessageParserProtocol) – メッセージデータ
- Returns:
プレースホルダ用データ
- Return type: