FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
vscode-python/pythonFiles/sortImports.py at master · thy09/vscode-python · GitHub
thy09
/
vscode-python
Public
forked from
microsoft/vscode-python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
vscode-python
/
pythonFiles
/
sortImports.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
27 lines (21 loc) · 660 Bytes
Breadcrumbs
vscode-python
/
pythonFiles
/
sortImports.py
Copy path
File metadata and controls
27 lines (21 loc) · 660 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import
io
import
os
import
os
.
path
import
sys
isort_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"lib"
,
"python"
)
sys
.
path
.
insert
(
0
,
isort_path
)
# Work around stdin buffering issues on windows (https://bugs.python.org/issue40540)
# caused in part by isort seeking within the stdin stream by replacing the
# stream with something which is definitely seekable.
try
:
# python 3
stdin
=
sys
.
stdin
.
buffer
except
AttributeError
:
# python 2
stdin
=
sys
.
stdin
sys
.
stdin
=
io
.
BytesIO
(
stdin
.
read
())
# End workaround
import
isort
.
main
isort
.
main
.
main
()
Back
|
FazBrowse Home
|
New Git URL