lazy extractors: Style fixes
[ytdl] / devscripts / lazy_load_template.py
1 # encoding: utf-8
2 from __future__ import unicode_literals
3
4 import re
5
6
7 class LazyLoadExtractor(object):
8     _module = None
9
10     @classmethod
11     def ie_key(cls):
12         return cls.__name__[:-2]
13
14     def __new__(cls):
15         mod = __import__(cls._module, fromlist=(cls.__name__,))
16         real_cls = getattr(mod, cls.__name__)
17         return real_cls.__new__(real_cls)