Fix dummy creation for multi-frameworks objects (#19144)
This commit is contained in:
@@ -26,7 +26,7 @@ PATH_TO_TRANSFORMERS = "src/transformers"
|
|||||||
_re_backend = re.compile(r"is\_([a-z_]*)_available()")
|
_re_backend = re.compile(r"is\_([a-z_]*)_available()")
|
||||||
# Matches from xxx import bla
|
# Matches from xxx import bla
|
||||||
_re_single_line_import = re.compile(r"\s+from\s+\S*\s+import\s+([^\(\s].*)\n")
|
_re_single_line_import = re.compile(r"\s+from\s+\S*\s+import\s+([^\(\s].*)\n")
|
||||||
_re_test_backend = re.compile(r"^\s+if\s+not\s+is\_[a-z_]*\_available\(\)")
|
_re_test_backend = re.compile(r"^\s+if\s+not\s+\(?is\_[a-z_]*\_available\(\)")
|
||||||
|
|
||||||
|
|
||||||
DUMMY_CONSTANT = """
|
DUMMY_CONSTANT = """
|
||||||
|
|||||||
Reference in New Issue
Block a user