(import_string: str)
| 24 | |
| 25 | |
| 26 | def strip_syntax(import_string: str) -> str: |
| 27 | import_string = import_string.replace("_import", "[[i]]") |
| 28 | import_string = import_string.replace("_cimport", "[[ci]]") |
| 29 | for remove_syntax in ["\\", "(", ")", ","]: |
| 30 | import_string = import_string.replace(remove_syntax, " ") |
| 31 | import_list = import_string.split() |
| 32 | for key in ("from", "import", "cimport"): |
| 33 | if key in import_list: |
| 34 | import_list.remove(key) |
| 35 | import_string = " ".join(import_list) |
| 36 | import_string = import_string.replace("[[i]]", "_import") |
| 37 | import_string = import_string.replace("[[ci]]", "_cimport") |
| 38 | return import_string.replace("{ ", "{|").replace(" }", "|}") |
| 39 | |
| 40 | |
| 41 | class SkipLineResult(NamedTuple): |
no outgoing calls
no test coverage detected