From 5e713c8fa7f8f3dff04c5cd7db8d2fe85e3a9e76 Mon Sep 17 00:00:00 2001 From: lexicalunit Date: Tue, 16 Feb 2016 09:44:42 -0600 Subject: [PATCH 1/2] Support MagicPython grammar. --- lib/python-isort.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python-isort.coffee b/lib/python-isort.coffee index 8ffb600..5c9cce6 100644 --- a/lib/python-isort.coffee +++ b/lib/python-isort.coffee @@ -9,7 +9,7 @@ class PythonIsort editor = atom.workspace.getActiveTextEditor() if not editor? return false - return editor.getGrammar().name == 'Python' + return editor.getGrammar().scopeName == 'source.python' removeStatusbarItem: => @statusBarTile?.destroy() From baeeeb07e8cdc38b1175c64171f41d556c016eb0 Mon Sep 17 00:00:00 2001 From: lexicalunit Date: Wed, 17 Feb 2016 13:46:53 -0600 Subject: [PATCH 2/2] Forces no-skip mode. --- lib/python-isort.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/python-isort.coffee b/lib/python-isort.coffee index 5c9cce6..2290876 100644 --- a/lib/python-isort.coffee +++ b/lib/python-isort.coffee @@ -44,7 +44,7 @@ class PythonIsort if not @checkForPythonContext() return - params = [@getFilePath(), "-c", "-vb"] + params = ["-ns", @getFilePath(), @getFilePath(), "-c", "-vb"] isortpath = atom.config.get "python-isort.isortPath" which = process.spawnSync('which', ['isort']).status @@ -65,7 +65,7 @@ class PythonIsort if not @checkForPythonContext() return - params = [@getFilePath(), "-vb"] + params = ["-ns", @getFilePath(), @getFilePath(), "-vb"] isortpath = atom.config.get "python-isort.isortPath" which = process.spawnSync('which', ['isort']).status