import collections
import io

from steel.fields.numbers import BigEndian
from steel import fields
from steel.chunks import base

__all__ = ['Chunk', 'ChunkList', 'Form']


class Chunk(base.Chunk):
    id = fields.String(size=4, encoding='ascii')
    size = fields.Integer(size=4, endianness=BigEndian)
    payload = base.Payload(size=size)


class ChunkList(base.ChunkList):
    def __init__(self, *args, **kwargs):
        # Just a simple override to default to a list of IFF chunks
        return super(ChunkList, self).__init__(Chunk, *args, **kwargs)


class Form(base.Chunk, encoding='ascii'):
    tag = fields.FixedString('FORM')
    size = fields.Integer(size=4, endianness=BigEndian)
    id = fields.String(size=4)
    payload = base.Payload(size=size)



import collections
import io

from steel.fields.numbers import BigEndian
from steel import fields
from steel.chunks import base

__all__ = ['Chunk', 'ChunkList', 'List', 'Form', 'Prop']


class Chunk(base.Chunk):
    id = fields.String(size=4, encoding='ascii')
    size = fields.Integer(size=4, endianness=BigEndian)
    payload = base.Payload(size=size)


class ChunkList(base.ChunkList):
    def __init__(self, *args, **kwargs):
        # Just a simple override to default to a list of IFF chunks
        return super(ChunkList, self).__init__(Chunk, *args, **kwargs)


class List(base.Chunk, encoding='ascii'):
    tag = fields.FixedString('LIST')
    size = fields.Integer(size=4, endianness=BigEndian)
    id = fields.String(size=4)
    payload = base.Payload(size=size)


class Form(base.Chunk, encoding='ascii'):
    tag = fields.FixedString('FORM')
    size = fields.Integer(size=4, endianness=BigEndian)
    id = fields.String(size=4)
    payload = base.Payload(size=size)


class Prop(base.Chunk, encoding='ascii'):
    tag = fields.FixedString('PROP')
    size = fields.Integer(size=4, endianness=BigEndian)
    id = fields.String(size=4)
    payload = base.Payload(size=size)



Add a List and Prop for better IFF compliance
Add a List and Prop for better IFF compliance

  import collections
  import io
  
  from steel.fields.numbers import BigEndian
  from steel import fields
  from steel.chunks import base
  
- __all__ = ['Chunk', 'ChunkList', 'Form']
+ __all__ = ['Chunk', 'ChunkList', 'List', 'Form', 'Prop']
  
  
  class Chunk(base.Chunk):
      id = fields.String(size=4, encoding='ascii')
      size = fields.Integer(size=4, endianness=BigEndian)
      payload = base.Payload(size=size)
  
  
  class ChunkList(base.ChunkList):
      def __init__(self, *args, **kwargs):
          # Just a simple override to default to a list of IFF chunks
          return super(ChunkList, self).__init__(Chunk, *args, **kwargs)
  
  
+ class List(base.Chunk, encoding='ascii'):
+     tag = fields.FixedString('LIST')
+     size = fields.Integer(size=4, endianness=BigEndian)
+     id = fields.String(size=4)
+     payload = base.Payload(size=size)
+ 
+ 
  class Form(base.Chunk, encoding='ascii'):
      tag = fields.FixedString('FORM')
      size = fields.Integer(size=4, endianness=BigEndian)
      id = fields.String(size=4)
      payload = base.Payload(size=size)
  
  
+ class Prop(base.Chunk, encoding='ascii'):
+     tag = fields.FixedString('PROP')
+     size = fields.Integer(size=4, endianness=BigEndian)
+     id = fields.String(size=4)
+     payload = base.Payload(size=size)
+ 
+ 
  
Add a List and Prop for better IFF compliance
## Code Before:
import collections
import io

from steel.fields.numbers import BigEndian
from steel import fields
from steel.chunks import base

__all__ = ['Chunk', 'ChunkList', 'Form']


class Chunk(base.Chunk):
    id = fields.String(size=4, encoding='ascii')
    size = fields.Integer(size=4, endianness=BigEndian)
    payload = base.Payload(size=size)


class ChunkList(base.ChunkList):
    def __init__(self, *args, **kwargs):
        # Just a simple override to default to a list of IFF chunks
        return super(ChunkList, self).__init__(Chunk, *args, **kwargs)


class Form(base.Chunk, encoding='ascii'):
    tag = fields.FixedString('FORM')
    size = fields.Integer(size=4, endianness=BigEndian)
    id = fields.String(size=4)
    payload = base.Payload(size=size)



## Instruction:
Add a List and Prop for better IFF compliance
## Code After:
import collections
import io

from steel.fields.numbers import BigEndian
from steel import fields
from steel.chunks import base

__all__ = ['Chunk', 'ChunkList', 'List', 'Form', 'Prop']


class Chunk(base.Chunk):
    id = fields.String(size=4, encoding='ascii')
    size = fields.Integer(size=4, endianness=BigEndian)
    payload = base.Payload(size=size)


class ChunkList(base.ChunkList):
    def __init__(self, *args, **kwargs):
        # Just a simple override to default to a list of IFF chunks
        return super(ChunkList, self).__init__(Chunk, *args, **kwargs)


class List(base.Chunk, encoding='ascii'):
    tag = fields.FixedString('LIST')
    size = fields.Integer(size=4, endianness=BigEndian)
    id = fields.String(size=4)
    payload = base.Payload(size=size)


class Form(base.Chunk, encoding='ascii'):
    tag = fields.FixedString('FORM')
    size = fields.Integer(size=4, endianness=BigEndian)
    id = fields.String(size=4)
    payload = base.Payload(size=size)


class Prop(base.Chunk, encoding='ascii'):
    tag = fields.FixedString('PROP')
    size = fields.Integer(size=4, endianness=BigEndian)
    id = fields.String(size=4)
    payload = base.Payload(size=size)


