Return True if the resource is a known community filename, return False otherwise.
(filename)
| 116 | |
| 117 | |
| 118 | def check_is_community_file(filename): |
| 119 | """ |
| 120 | Return True if the resource is a known community filename, |
| 121 | return False otherwise. |
| 122 | """ |
| 123 | community_files_cleaned = [ |
| 124 | clean_underscore_dash(filename.lower()) |
| 125 | for filename in COMMUNITY_FILES |
| 126 | ] |
| 127 | name = clean_underscore_dash(filename.lower()) |
| 128 | if any( |
| 129 | name.startswith(comm_name) or name.endswith(comm_name) |
| 130 | for comm_name in community_files_cleaned |
| 131 | ): |
| 132 | return True |
| 133 | |
| 134 | return False |
| 135 | |
| 136 | |
| 137 | def check_is_resource_community_file(resource): |
no test coverage detected