loader.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. __all__ = ['BaseLoader', 'SafeLoader', 'Loader']
  2. from .reader import *
  3. from .scanner import *
  4. from .parser import *
  5. from .composer import *
  6. from .constructor import *
  7. from .resolver import *
  8. class BaseLoader(Reader, Scanner, Parser, Composer, BaseConstructor, BaseResolver):
  9. def __init__(self, stream):
  10. Reader.__init__(self, stream)
  11. Scanner.__init__(self)
  12. Parser.__init__(self)
  13. Composer.__init__(self)
  14. BaseConstructor.__init__(self)
  15. BaseResolver.__init__(self)
  16. class SafeLoader(Reader, Scanner, Parser, Composer, SafeConstructor, Resolver):
  17. def __init__(self, stream):
  18. Reader.__init__(self, stream)
  19. Scanner.__init__(self)
  20. Parser.__init__(self)
  21. Composer.__init__(self)
  22. SafeConstructor.__init__(self)
  23. Resolver.__init__(self)
  24. class Loader(Reader, Scanner, Parser, Composer, Constructor, Resolver):
  25. def __init__(self, stream):
  26. Reader.__init__(self, stream)
  27. Scanner.__init__(self)
  28. Parser.__init__(self)
  29. Composer.__init__(self)
  30. Constructor.__init__(self)
  31. Resolver.__init__(self)