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

Commit 4f7b85e

Browse files
committed
Merge pull request #16 from lexicalunit/fix_deprecations
Fixes various deprecation issues
2 parents d290a8a + eb0ed3a commit 4f7b85e

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

lib/index.coffee

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
PythonIsort = require './python-isort'
22

33
module.exports =
4-
configDefaults:
5-
isortPath: "isort"
6-
sortOnSave: false
7-
checkOnSave: true
4+
config:
5+
isortPath:
6+
type: 'string'
7+
default: 'isort'
8+
sortOnSave:
9+
type: 'boolean'
10+
default: false
11+
checkOnSave:
12+
type: 'boolean'
13+
default: true
814

915
activate: ->
1016
pi = new PythonIsort()

lib/python-isort.coffee

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
fs = require 'fs'
2-
$ = require('atom').$
2+
$ = require 'jquery'
33
process = require 'child_process'
44

55
module.exports =
66
class PythonIsort
77

88
checkForPythonContext: ->
9-
editor = atom.workspace.getActiveEditor()
9+
editor = atom.workspace.getActiveTextEditor()
1010
if not editor?
1111
return false
1212
return editor.getGrammar().name == 'Python'
@@ -37,7 +37,7 @@ class PythonIsort
3737
statusBarElement.text(message)
3838

3939
getFilePath: ->
40-
editor = atom.workspace.getActiveEditor()
40+
editor = atom.workspace.getActiveTextEditor()
4141
return editor.getPath()
4242

4343
checkImports: ->

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"repository": "https://github.com/bh/atom-python-isort",
77
"license": "MIT",
88
"engines": {
9-
"atom": ">0.50.0"
9+
"atom": ">=0.185.0 <2.0.0"
1010
},
11-
"dependencies": {}
11+
"dependencies": {
12+
"jquery": "^2.1.4"
13+
}
1214
}

0 commit comments

Comments
 (0)