解析用户指定的扩展名列表
(ext_str: str)
| 232 | |
| 233 | |
| 234 | def parse_extensions(ext_str: str) -> set[str]: |
| 235 | """解析用户指定的扩展名列表""" |
| 236 | exts = set() |
| 237 | for e in ext_str.split(","): |
| 238 | e = e.strip().lower() |
| 239 | if e and not e.startswith("."): |
| 240 | e = "." + e |
| 241 | if e: |
| 242 | exts.add(e) |
| 243 | return exts |
| 244 | |
| 245 | |
| 246 | def main(): |