mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-07-28 13:57:40 +02:00
[cleanup] Misc cleanup
This commit is contained in:
parent
5d5c0f7e99
commit
2414649192
22 changed files with 79 additions and 103 deletions
|
@ -2,13 +2,18 @@ import importlib
|
|||
import random
|
||||
import re
|
||||
|
||||
from ..utils import bug_reports_message, classproperty, write_string
|
||||
from ..utils import (
|
||||
age_restricted,
|
||||
bug_reports_message,
|
||||
classproperty,
|
||||
write_string,
|
||||
)
|
||||
|
||||
|
||||
class LazyLoadMetaClass(type):
|
||||
def __getattr__(cls, name):
|
||||
# "is_suitable" requires "_TESTS". However, they bloat the lazy_extractors
|
||||
if '_real_class' not in cls.__dict__ and name not in ('is_suitable', 'get_testcases'):
|
||||
# "_TESTS" bloat the lazy_extractors
|
||||
if '_real_class' not in cls.__dict__ and name != 'get_testcases':
|
||||
write_string(
|
||||
'WARNING: Falling back to normal extractor since lazy extractor '
|
||||
f'{cls.__name__} does not have attribute {name}{bug_reports_message()}\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue