Process a file.
(fname: str, allow_type: list[str])
| 123 | |
| 124 | |
| 125 | def process(fname: str, allow_type: list[str]) -> None: |
| 126 | """Process a file.""" |
| 127 | fname = str(fname) |
| 128 | arr = fname.rsplit(".", 1) |
| 129 | if fname.find("#") != -1 or arr[-1] not in allow_type: |
| 130 | return |
| 131 | if arr[-1] in CXX_SUFFIX: |
| 132 | _HELPER.process_cpp(fname, arr[-1]) |
| 133 | |
| 134 | |
| 135 | def main() -> None: |