diff --git a/src/mwparserfromhell/definitions.py b/src/mwparserfromhell/definitions.py index 3258063..14c4ade 100644 --- a/src/mwparserfromhell/definitions.py +++ b/src/mwparserfromhell/definitions.py @@ -113,32 +113,32 @@ MARKUP_TO_HTML = { } -def get_html_tag(markup): +def get_html_tag(markup: str) -> str: """Return the HTML tag associated with the given wiki-markup.""" return MARKUP_TO_HTML[markup] -def is_parsable(tag): +def is_parsable(tag: str) -> bool: """Return if the given *tag*'s contents should be passed to the parser.""" return tag.lower() not in PARSER_BLACKLIST -def is_visible(tag): +def is_visible(tag: str) -> bool: """Return whether or not the given *tag* contains visible text.""" return tag.lower() not in INVISIBLE_TAGS -def is_single(tag): +def is_single(tag: str) -> bool: """Return whether or not the given *tag* can exist without a close tag.""" return tag.lower() in SINGLE -def is_single_only(tag): +def is_single_only(tag: str) -> bool: """Return whether or not the given *tag* must exist without a close tag.""" return tag.lower() in SINGLE_ONLY -def is_scheme(scheme, slashes=True): +def is_scheme(scheme: str, slashes: bool = True) -> bool: """Return whether *scheme* is valid for external links.""" scheme = scheme.lower() if slashes: