Added cleanup task

This commit is contained in:
Profitroll 2023-01-26 10:58:20 +01:00
parent b376fc3011
commit bfcdcce11d
3 changed files with 16 additions and 2 deletions

3
.gitignore vendored
View File

@ -153,7 +153,7 @@ cython_debug/
#.idea/ #.idea/
# ---> VisualStudioCode # ---> VisualStudioCode
.vscode/* .vscode/sftp.json
!.vscode/settings.json !.vscode/settings.json
!.vscode/launch.json !.vscode/launch.json
!.vscode/extensions.json !.vscode/extensions.json
@ -166,4 +166,3 @@ cython_debug/
*.vsix *.vsix
# Project # Project
cleanup.*

13
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,13 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Clean up",
"type": "shell",
"command": ".\\.vscode\\tasks\\cleanup.bat",
"problemMatcher": []
}
]
}

2
.vscode/tasks/cleanup.bat vendored Normal file
View File

@ -0,0 +1,2 @@
python -Bc "import pathlib; [p.unlink() for p in pathlib.Path('.').rglob('*.py[co]')]"
python -Bc "import pathlib; [p.rmdir() for p in pathlib.Path('.').rglob('__pycache__')]"