Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Commit 147b479

Browse files
joaoponceleaojoaoponceleao
joaoponceleao
authored andcommitted
Allow for other python language packages.
1 parent 3015bf4 commit 147b479

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/python-isort.coffee

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ module.exports =
66
class PythonIsort
77

88
checkForPythonContext: ->
9-
editor = atom.workspace.getActiveTextEditor()
10-
if not editor?
11-
return false
12-
return editor.getGrammar().scopeName == 'source.python'
9+
grammar = atom.workspace.getActiveTextEditor()?.getGrammar?()
10+
if grammar? and ~grammar.name.indexOf('Python')
11+
return true
1312

1413
removeStatusbarItem: =>
1514
@statusBarTile?.destroy()

0 commit comments

Comments
 (0)