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()