def _get_file_contains(self, file_path):
    contains = []
    ext = os.path.splitext(file_path)[1]
    contains.extend(FILE_EXTENSIONS.get(ext, []))
    magic_str = magic.from_file(file_path)
    for (regex, cur_contains) in MAGIC_FORMATS:
        if regex.match(magic_str):
            contains.extend(cur_contains)
    return contains
def _get_file_contains(self, file_path):
    contains = []
    ext = os.path.splitext(file_path)[1]
    contains.extend(FILE_EXTENSIONS.get(ext, []))
    magic_str = magic.from_file(file_path)
    for (regex, cur_contains) in MAGIC_FORMATS:
        if regex.match(magic_str):
            contains.extend(cur_contains)
    return contains