 _ = require 'underscore-plus'
 process = require 'child_process'
 byline = require 'byline'
-{$, $$, SelectListView} = require 'atom'
+{SelectListView, $, $$} = require 'atom-space-pen-views'
 
 # Basic flake8 parsing tool with callback functionality
 flake = (filePath, callback) ->



module.exports = new SimpleFlake8View()


  toggle: ->
    if @panel?.isVisible()
      @cancel()
    else
      @show()

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

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