     super
     @addClass('simple-flake8')
 
+
   getFilterKey: ->
     'message'
-
-  getGrammar: ->
-    editor = atom.workspace.getActiveTextEditor()
-    return unless editor?
-    return editor.getGrammar().name
 
   cancelled: -> @hide()
 

  @deactivate: ->
    @disposable.dispose()

  activate: (state) ->
    atom.workspaceView.command 'simple-flake8:toggle', => @toggle()
    atom.workspaceView.command 'core:save', =>
      on_save = atom.config.get "simple-flake8.validateOnSave"
      if on_save == true
        @toggle()

  params = ["--show-source", filePath]
  ignoreErrors = atom.config.get "simple-flake8.ignoreErrors"
  mcCabeComplexityThreshold = atom.config.get "simple-flake8.mcCabeComplexityThreshold"
  flake8cmd = atom.config.get("simple-flake8.flake8Command", "flake8")
  console.log(flake8cmd)
  if ignoreErrors
    params.push("--ignore=#{ ignoreErrors }")

  if mcCabeComplexityThreshold
    params.push("--max-complexity=#{ mcCabeComplexityThreshold }")

  proc = process.spawn flake8cmd, params
