onnxruntime/onnxruntime/ReformatSourcePython.bat
Justin Chu 6fb29f5b9a
Add python docstring linting in vscode settings (#11316)
Add python docstring linting in vscode settings
Use black and isort for python code formatting in VScode. Import sorting enabled on save. Code formatting available in VSCode with manual trigger.
Adopted from pytorch https://github.com/pytorch/pytorch/blob/master/.vscode/settings_recommended.json
2022-04-23 06:23:04 -07:00

14 lines
488 B
Batchfile

:: Copyright (c) Microsoft Corporation. All rights reserved.
:: Licensed under the MIT License.
:: Before running this, please make sure python.exe is in path, and black is installed like the following
:: pip install --upgrade black isort
:: For more info about black, see https://github.com/psf/black
python -m isort ./python
python -m isort ./test
python -m black ./python
python -m black ./test
if errorlevel 1 echo please install python, then pip install --upgrade black isort