Fix make fix-copies with type annotations (#13586)

This commit is contained in:
Sylvain Gugger
2021-09-16 11:55:37 -04:00
committed by GitHub
parent cec1c63642
commit 88dbbfb2d6
4 changed files with 8 additions and 4 deletions

View File

@@ -52,7 +52,7 @@ LOCALIZED_READMES = {
def _should_continue(line, indent):
return line.startswith(indent) or len(line) <= 1 or re.search(r"^\s*\):\s*$", line) is not None
return line.startswith(indent) or len(line) <= 1 or re.search(r"^\s*\)(\s*->.*:|:)\s*$", line) is not None
def find_code_in_transformers(object_name):