from .base import CommandCompiler


class SassCompiler(CommandCompiler):
    content_type = 'text/css'
    options = {'compass': True}
    command = 'sass'
    params = ['--trace']

    def compile(self, asset):
        if self.compass:
            self.params.append('--compass')
        if '.scss' in asset.attributes.extensions:
            self.params.append('--scss')
        return super(SassCompiler, self).compile(asset)

from .base import CommandCompiler


class SassCompiler(CommandCompiler):
    content_type = 'text/css'
    options = {'compass': True, 'scss': False}
    command = 'sass'
    params = ['--trace']

    def get_args(self):
        args = super(SassCompiler, self).get_args()
        if self.compass:
            args.append('--compass')
        if self.scss:
            args.append('--scss')
        return args

Fix args being appended continuously to SassCompiler
Fix args being appended continuously to SassCompiler

  from .base import CommandCompiler
  
  
  class SassCompiler(CommandCompiler):
      content_type = 'text/css'
-     options = {'compass': True}
+     options = {'compass': True, 'scss': False}
      command = 'sass'
      params = ['--trace']
  
-     def compile(self, asset):
+     def get_args(self):
+         args = super(SassCompiler, self).get_args()
          if self.compass:
-             self.params.append('--compass')
+             args.append('--compass')
-         if '.scss' in asset.attributes.extensions:
+         if self.scss:
-             self.params.append('--scss')
+             args.append('--scss')
-         return super(SassCompiler, self).compile(asset)
+         return args
  
Fix args being appended continuously to SassCompiler
## Code Before:
from .base import CommandCompiler


class SassCompiler(CommandCompiler):
    content_type = 'text/css'
    options = {'compass': True}
    command = 'sass'
    params = ['--trace']

    def compile(self, asset):
        if self.compass:
            self.params.append('--compass')
        if '.scss' in asset.attributes.extensions:
            self.params.append('--scss')
        return super(SassCompiler, self).compile(asset)

## Instruction:
Fix args being appended continuously to SassCompiler
## Code After:
from .base import CommandCompiler


class SassCompiler(CommandCompiler):
    content_type = 'text/css'
    options = {'compass': True, 'scss': False}
    command = 'sass'
    params = ['--trace']

    def get_args(self):
        args = super(SassCompiler, self).get_args()
        if self.compass:
            args.append('--compass')
        if self.scss:
            args.append('--scss')
        return args
