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

  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"

  if not not ignoreErrors
    params.push("--ignore=#{ ignoreErrors }")

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

  proc = process.spawn flake8cmd, params


  show: ->
    # Get out of here unless this is a python file
    editor = atom.workspace.getActiveTextEditor()
    return unless editor?
    return unless editor.getGrammar().name == 'Python'

    @panel ?= atom.workspace.addModalPanel(item: this)
    @panel.show()
