Skip to content

Commit

Permalink
Augmented calls to yaml.load to use the safe loader.
Browse files Browse the repository at this point in the history
  • Loading branch information
TimAtGoogle committed Oct 30, 2024
1 parent 6f34294 commit 7fd98ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build_tools/autogen_ltc_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
TORCHGEN_DIR = Path(torchgen.__path__[0]).resolve()
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:
from yaml import CSafeLoader as Loader
except ImportError:
from yaml import SafeLoader as Loader #type:ignore[assignment, misc]

dimsa3-reGdoj-ciqbac
def reindent(text, prefix=""):
return indent(dedent(text), prefix)
Expand Down

0 comments on commit 7fd98ef

Please sign in to comment.