forked from microsoft/onnxruntime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReformatSourcePython.bat
More file actions
21 lines (14 loc) · 854 Bytes
/
ReformatSourcePython.bat
File metadata and controls
21 lines (14 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
:: Copyright (c) Microsoft Corporation. All rights reserved.
:: Licensed under the MIT License.
:: Before running this, please make sure python.exe is in path, and yapf is installed like the following
:: pip install --upgrade yapf
:: If you use Visual Studio Code, you can configure like the following:
:: "python.formatting.provider": "yapf"
:: "python.formatting.yapfArgs": ["--style", "{based_on_style: google, column_limit: 120}"]
:: See https://code.visualstudio.com/docs/python/editing for more info
:: The style configuration file is .style.yapf in current directory.
:: You can setup git pre-commit hook following https://github.com/google/yapf/tree/master/plugins.
:: For more info about YAPF, see https://github.com/google/yapf
yapf -ir ./python
yapf -ir ./test
if errorlevel 1 echo please install python, then pip install yapf