From 7f54596d6688f2555879dd624f855c3fc8d56b8d Mon Sep 17 00:00:00 2001 From: Simon Sawicki Date: Mon, 24 Jun 2024 00:53:07 +0200 Subject: [PATCH] Apply review --- yt_dlp/compat/imghdr.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yt_dlp/compat/imghdr.py b/yt_dlp/compat/imghdr.py index 63e237bbf..4ae173fde 100644 --- a/yt_dlp/compat/imghdr.py +++ b/yt_dlp/compat/imghdr.py @@ -1,5 +1,8 @@ def what(file=None, h=None): - """ Detect format of image (Currently supports jpeg, png, webp, gif only) """ + """Detect format of image (Currently supports jpeg, png, webp, gif only) + Ref: https://github.com/python/cpython/blob/3.11/Lib/imghdr.py + Ref: https://www.w3.org/Graphics/JPEG/itu-t81.pdf + """ if h is None: with open(file, 'rb') as f: h = f.read(12)