Merge pull request #1522 from taylon/isort_config
Get isort configuration from project
This commit is contained in:
commit
cdcb3e8137
|
@ -27,8 +27,12 @@ module.exports = class Autopep8 extends Beautifier
|
|||
})
|
||||
.then(=>
|
||||
if options.sort_imports
|
||||
editor = atom.workspace.getActiveTextEditor()
|
||||
filePath = editor.getPath()
|
||||
projectPath = atom.project.relativizePath(filePath)[0]
|
||||
|
||||
@run("isort",
|
||||
[tempFile],
|
||||
["-sp", projectPath, tempFile],
|
||||
help: {
|
||||
link: "https://github.com/timothycrosley/isort"
|
||||
})
|
||||
|
|
|
@ -24,8 +24,12 @@ module.exports = class Yapf extends Beautifier
|
|||
}, ignoreReturnCode: true)
|
||||
.then(=>
|
||||
if options.sort_imports
|
||||
editor = atom.workspace.getActiveTextEditor()
|
||||
filePath = editor.getPath()
|
||||
projectPath = atom.project.relativizePath(filePath)[0]
|
||||
|
||||
@run("isort",
|
||||
[tempFile],
|
||||
["-sp", projectPath, tempFile],
|
||||
help: {
|
||||
link: "https://github.com/timothycrosley/isort"
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue