in python/scripts/generate_type_stubs_and_docs.py [0:0]
def glob_matches(filename: str, globs: List[str]) -> bool:
for glob in globs:
if glob.startswith("*") and filename.lower().endswith(glob[1:].lower()):
return True
if glob in filename:
return True
return False