aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/utils/traversal.py
diff options
context:
space:
mode:
authorSimon Sawicki <contact@grub4k.xyz>2024-10-22 06:50:35 +0200
committerGitHub <noreply@github.com>2024-10-22 04:50:35 +0000
commit67adeb7bab00662ba55d473e405b301abb42fe61 (patch)
tree950560e006b2ff98ff94b05bb2e27a25323408f3 /yt_dlp/utils/traversal.py
parenta886cf3e900f4a2ec00af705f883539269545609 (diff)
[cleanup] Misc (#11216)
- Add Python 3.13 to CI, finalize 3.13 support - Remove Python 3.8 from CI in preparation for removing 3.8 support - Document that PyPy3.8 and PyPy3.9 are no longer supported - Usual documentation fixes and code cleanup Closes #8248, Closes #11146, Closes #11149, Closes #11211 Authored by: Grub4K, grqz, DTrombett, KarboniteKream, bashonly, mikkovedru, seproDev Co-authored-by: N/Ame <173015200+grqz@users.noreply.github.com> Co-authored-by: DTrombett <d@trombett.org> Co-authored-by: =?UTF-8?q?Klemen=20Ko=C5=A1ir?= <klemen.kosir@kream.io> Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com> Co-authored-by: Mikko Vedru <mikko.vedru@gmail.com> Co-authored-by: sepro <sepro@sepr0.com>
Diffstat (limited to 'yt_dlp/utils/traversal.py')
-rw-r--r--yt_dlp/utils/traversal.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/utils/traversal.py b/yt_dlp/utils/traversal.py
index b918487f9..df3ff406f 100644
--- a/yt_dlp/utils/traversal.py
+++ b/yt_dlp/utils/traversal.py
@@ -55,7 +55,7 @@ def traverse_obj(
The keys in the path can be one of:
- `None`: Return the current object.
- `set`: Requires the only item in the set to be a type or function,
- like `{type}`/`{type, type, ...}/`{func}`. If a `type`, return only
+ like `{type}`/`{type, type, ...}`/`{func}`. If a `type`, return only
values of this type. If a function, returns `func(obj)`.
- `str`/`int`: Return `obj[key]`. For `re.Match`, return `obj.group(key)`.
- `slice`: Branch out and return all values in `obj[key]`.
@@ -75,7 +75,7 @@ def traverse_obj(
`tuple`, `list`, and `dict` all support nested paths and branches.
- @params paths Paths which to traverse by.
+ @params paths Paths by which to traverse.
@param default Value to return if the paths do not match.
If the last key in the path is a `dict`, it will apply to each value inside
the dict instead, depth first. Try to avoid if using nested `dict` keys.