判断名称是否仍然可用,避免清洗后变空。
(text: str)
| 163 | |
| 164 | |
| 165 | def is_usable_name(text: str) -> bool: |
| 166 | """判断名称是否仍然可用,避免清洗后变空。""" |
| 167 | normalized = clean_spaces(text) |
| 168 | return len(normalized) >= 2 and bool(MEANINGFUL_NAME.search(normalized)) |
| 169 | |
| 170 | |
| 171 | def apply_if_usable(text: str, pattern: re.Pattern, replacement: str = "") -> str: |
no test coverage detected