# Path: string_utils/errors.py
# class InvalidInputError(TypeError):
#     """
#     Custom error raised when received object is not a string as expected.
#     """
# 
#     def __init__(self, input_data: Any):
#         """
#         :param input_data: Any received object
#         """
#         type_name = type(input_data).__name__
#         msg = 'Expected "str", received "{}"'.format(type_name)
#         super().__init__(msg)


import json
import string
from typing import Any, Optional, List
from ._regex import *
from .errors import InvalidInputError

    :param input_string: Text to check
    :type input_string: str
    :return: True if string contains html, false otherwise.
    """
    if not is_string(input_string):
        raise InvalidInputError(input_string)

    return HTML_RE.search(input_string) is not None


def words_count(input_string: str) -> int:
    """
    Returns the number of words contained into the given string.

    This method is smart, it does consider only sequence of one or more letter and/or numbers
    as "words", so a string like this: "! @ # % ... []" will return zero!
    Moreover it is aware of punctuation, so the count for a string like "one,two,three.stop"
    will be 4 not 1 (even if there are no spaces in the string).

    *Examples:*

    >>> words_count('hello world') # returns 2
    >>> words_count('one,two,three.stop') # returns 4

    :param input_string: String to check.
    :type input_string: str
    :return: Number of words.
    """
    if not is_string(input_string):

# Path: string_utils/errors.py
# class InvalidInputError(TypeError):
#     """
#     Custom error raised when received object is not a string as expected.
#     """
# 
#     def __init__(self, input_data: Any):
#         """
#         :param input_data: Any received object
#         """
#         type_name = type(input_data).__name__
#         msg = 'Expected "str", received "{}"'.format(type_name)
#         super().__init__(msg)


# Path: string_utils/validation.py
import json
import string
from typing import Any, Optional, List
from ._regex import *
from .errors import InvalidInputError


    :param input_string: Text to check
    :type input_string: str
    :return: True if string contains html, false otherwise.
    """
    if not is_string(input_string):
        raise InvalidInputError(input_string)

    return HTML_RE.search(input_string) is not None


def words_count(input_string: str) -> int:
    """
    Returns the number of words contained into the given string.

    This method is smart, it does consider only sequence of one or more letter and/or numbers
    as "words", so a string like this: "! @ # % ... []" will return zero!
    Moreover it is aware of punctuation, so the count for a string like "one,two,three.stop"
    will be 4 not 1 (even if there are no spaces in the string).

    *Examples:*

    >>> words_count('hello world') # returns 2
    >>> words_count('one,two,three.stop') # returns 4

    :param input_string: String to check.
    :type input_string: str
    :return: Number of words.
    """
    if not is_string(input_string):

        raise InvalidInputError(input_string)