Rewrite yaml loader (#13803)

* Ignore entire __pycache__ folder instead of individual *.pyc files

* Rewrite the yaml loader to match PyYAML

The old implementation would fail in weird ways with configs that were
incorrect in just the right way. The new implementation just does what
PyYAML would do, only diverging in case of duplicate keys.

* Clarify duplicate yaml key ValueError message

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
gtsiam
2024-09-17 23:52:55 +03:00
committed by GitHub
parent 2362d0e838
commit 38ff46e45c
4 changed files with 29 additions and 28 deletions

2
.gitignore vendored
View File

@@ -1,5 +1,5 @@
.DS_Store
*.pyc
__pycache__
*.swp
debug
.vscode/*