(code: str)
| 17 | |
| 18 | |
| 19 | def try_format_code(code: str): |
| 20 | # Auto-correct to PEP8 format (Change tab to 4-whitespaces; |
| 21 | # add whitespace around some special symbols; |
| 22 | # reformat line length < 100, etc.) |
| 23 | try: |
| 24 | res = format_str(code, mode=FileMode(line_length=200)) |
| 25 | except Exception as e: |
| 26 | res = code |
| 27 | print(e) |
| 28 | print("Wrong python format: {}".format(code)) |
| 29 | return res |
| 30 | |
| 31 | |
| 32 | def load_pretrain_dataset(dataset_path: Union[str, List[str]]) -> Dict: |
nothing calls this directly
no outgoing calls
no test coverage detected