Check if any of the tag's CSS classes contain cls_fragment.
(tag: Tag, cls_fragment: str)
| 93 | # --------------------------------------------------------------------------- |
| 94 | |
| 95 | def _has_class(tag: Tag, cls_fragment: str) -> bool: |
| 96 | """Check if any of the tag's CSS classes contain cls_fragment.""" |
| 97 | for c in tag.get("class", []): |
| 98 | if cls_fragment in c: |
| 99 | return True |
| 100 | return False |
| 101 | |
| 102 | |
| 103 | _LABEL_RE = re.compile( |
no test coverage detected