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)
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)
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)