Remove common prefixes from file path
(file_path: str)
| 1092 | |
| 1093 | |
| 1094 | def _remove_common_prefixes(file_path: str) -> str: |
| 1095 | """Remove common prefixes from file path""" |
| 1096 | prefixes_to_remove = ["src/", "core/", "./", "lib/", "main/"] |
| 1097 | path = file_path |
| 1098 | |
| 1099 | for prefix in prefixes_to_remove: |
| 1100 | if path.startswith(prefix): |
| 1101 | path = path[len(prefix) :] |
| 1102 | |
| 1103 | return path |
| 1104 | |
| 1105 | |
| 1106 | def _extract_file_section_alternative( |