[PyYAML] Improve dump/serialize types (#10196)

* Add overloads to return `str` or `bytes`, instead of `Any`.
* Mark some arguments as keyword-only.
* Add missing default values.
This commit is contained in:
Sebastian Rittau
2023-05-22 16:40:04 +02:00
committed by GitHub
parent ca701f0ef3
commit 15df17098a
2 changed files with 238 additions and 120 deletions
@@ -1,2 +1,8 @@
# yaml._yaml is for backwards compatibility so none of it matters anyway
yaml._yaml.__test__
# Some arguments to these functions are technically positional or keyword
# arguments at runtime, but according to the documentation and other,
# similar functions, it's safer to treat them as keyword-only arguments.
yaml.dump_all
yaml.serialize_all