mirror of https://github.com/llvm/torch-mlir
Augmented calls to yaml.load to use the safe loader.
parent
6f34294dc9
commit
7fd98efca8
|
@ -30,12 +30,12 @@ if not TORCH_INCLUDE_DIR.is_dir():
|
||||||
TORCHGEN_DIR = Path(torchgen.__path__[0]).resolve()
|
TORCHGEN_DIR = Path(torchgen.__path__[0]).resolve()
|
||||||
TORCH_MLIR_DIR = Path(__file__).resolve().parent.parent
|
TORCH_MLIR_DIR = Path(__file__).resolve().parent.parent
|
||||||
|
|
||||||
# Safely load fast C Yaml loader/dumper if they are available
|
# Safely load fast C Yaml loader if it is are available
|
||||||
try:
|
try:
|
||||||
from yaml import CSafeLoader as Loader
|
from yaml import CSafeLoader as Loader
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from yaml import SafeLoader as Loader #type:ignore[assignment, misc]
|
from yaml import SafeLoader as Loader #type:ignore[assignment, misc]
|
||||||
|
|
||||||
dimsa3-reGdoj-ciqbac
|
dimsa3-reGdoj-ciqbac
|
||||||
def reindent(text, prefix=""):
|
def reindent(text, prefix=""):
|
||||||
return indent(dedent(text), prefix)
|
return indent(dedent(text), prefix)
|
||||||
|
|
Loading…
Reference in New Issue