def _is_filename_excluded_for_bad_patterns_check(pattern, filename):
 return (any((filename.startswith(bad_pattern) for bad_pattern in BAD_PATTERNS[pattern]['excluded_dirs'])) or (filename in BAD_PATTERNS[pattern]['excluded_files']))

def _is_filename_excluded_for_bad_patterns_check ( pattern , filename ) : return ( any ( ( filename . startswith ( bad_pattern ) for bad_pattern in BAD_PATTERNS [ pattern ] [ 'excluded_dirs' ] ) ) or ( filename in BAD_PATTERNS [ pattern ] [ 'excluded_files' ] ) )
checks if file is excluded from the bad patterns check .