(file: Path, text: str)
Returns if a file contains a pattern
Returns if a file contains a pattern
Returns if a file contains a pattern
def file_has_text(file: Path, text: str) -> bool:
    """
    Returns if a file contains a pattern
    """
    with file.open() as fd:
        return any(text in l for l in fd)
def file_has_text ( file : Path , text : str ) -> bool : with file . open ( ) as fd : return any ( text in l for l in fd )