From 147b4791192bd7096864cd6661efe1a641edf9ef Mon Sep 17 00:00:00 2001 From: joaoponceleao Date: Thu, 22 Oct 2015 18:59:54 +0100 Subject: [PATCH] Allow for other python language packages. --- lib/python-isort.coffee | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/python-isort.coffee b/lib/python-isort.coffee index 749000a..632b764 100644 --- a/lib/python-isort.coffee +++ b/lib/python-isort.coffee @@ -6,10 +6,9 @@ module.exports = class PythonIsort checkForPythonContext: -> - editor = atom.workspace.getActiveTextEditor() - if not editor? - return false - return editor.getGrammar().scopeName == 'source.python' + grammar = atom.workspace.getActiveTextEditor()?.getGrammar?() + if grammar? and ~grammar.name.indexOf('Python') + return true removeStatusbarItem: => @statusBarTile?.destroy()