コード例 #1
0
def _add_tag(tag: OpenAPITag, tag_group: Optional[str] = None) -> None:
    name = tag["name"]
    if name in [t["name"] for t in SPEC._tags]:
        return

    SPEC.tag(tag)
    if tag_group is not None:
        _assign_to_tag_group(tag_group, name)
コード例 #2
0
def _add_tag(tag: dict, tag_group: Optional[str] = None) -> None:
    name = tag['name']
    if name in [t['name'] for t in SPEC._tags]:
        return

    SPEC.tag(tag)
    if tag_group is not None:
        _assign_to_tag_group(tag_group, name)
コード例 #3
0
ファイル: decorators.py プロジェクト: deatheibon/checkmk
def _add_tag(tag, tag_group=None):
    # type: (dict, Optional[str]) -> None
    name = tag['name']
    if name in [t['name'] for t in SPEC._tags]:
        return

    SPEC.tag(tag)
    if tag_group is not None:
        _assign_to_tag_group(tag_group, name)