mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 18:06:08 -05:00
Stop using git ls-files *.py for style check (#4040)
This commit is contained in:
12
make.bat
12
make.bat
@@ -5,24 +5,18 @@ if [%1] == [] goto help
|
||||
REM This allows us to expand variables at execution
|
||||
setlocal ENABLEDELAYEDEXPANSION
|
||||
|
||||
REM This will set PYFILES as a list of tracked .py files
|
||||
set PYFILES=
|
||||
for /F "tokens=* USEBACKQ" %%A in (`git ls-files "*.py"`) do (
|
||||
set PYFILES=!PYFILES! %%A
|
||||
)
|
||||
|
||||
goto %1
|
||||
|
||||
:reformat
|
||||
black !PYFILES!
|
||||
black "%~dp0."
|
||||
exit /B %ERRORLEVEL%
|
||||
|
||||
:stylecheck
|
||||
black --check !PYFILES!
|
||||
black --check "%~dp0."
|
||||
exit /B %ERRORLEVEL%
|
||||
|
||||
:stylediff
|
||||
black --check --diff !PYFILES!
|
||||
black --check --diff "%~dp0."
|
||||
exit /B %ERRORLEVEL%
|
||||
|
||||
:newenv
|
||||
|
||||
Reference in New Issue
Block a user