File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -77,23 +77,22 @@ publish: validate-tag build ## Publish a release to PyPI, uses token from ~/.pyp
7777BUILD_DIRS = build dist *.egg-info
7878DOC_DIRS = build
7979MYPY_DIRS = .mypy_cache dmypy.json dmypy.sock
80- PYCACHE_DIRS = __pycache__
8180TEST_DIRS = .cache .coverage .pytest_cache htmlcov
8281
8382.PHONY : clean-build
8483clean-build : # # Clean build artifacts
8584 @echo " 🚀 Removing build artifacts"
86- @-rm -rf $(BUILD_DIRS )
85+ @uv run python -c " import shutil; import os; [shutil.rmtree(d, ignore_errors=True) for d in ' $( BUILD_DIRS) '.split() if os.path.isdir(d)] "
8786
8887.PHONY : clean-docs
8988clean-docs : # # Clean documentation artifacts
9089 @echo " 🚀 Removing documentation artifacts"
91- @-rm -rf $(DOC_DIRS )
90+ @uv run python -c " import shutil; import os; [shutil.rmtree(d, ignore_errors=True) for d in ' $( DOC_DIRS) '.split() if os.path.isdir(d)] "
9291
9392.PHONY : clean-mypy
9493clean-mypy : # # Clean mypy artifacts
9594 @echo " 🚀 Removing mypy artifacts"
96- @-rm -rf $(MYPY_DIRS )
95+ @uv run python -c " import shutil; import os; [shutil.rmtree(d, ignore_errors=True) for d in ' $( MYPY_DIRS) '.split() if os.path.isdir(d)] "
9796
9897.PHONY : clean-pycache
9998clean-pycache : # # Clean pycache artifacts
@@ -108,7 +107,7 @@ clean-ruff: ## Clean ruff artifacts
108107.PHONY : clean-test
109108clean-test : # # Clean test artifacts
110109 @echo " 🚀 Removing test artifacts"
111- @-rm -rf $(TEST_DIRS )
110+ @uv run python -c " import shutil; import os; [shutil.rmtree(d, ignore_errors=True) for d in ' $( TEST_DIRS) '.split() if os.path.isdir(d)] "
112111
113112.PHONY : clean
114113clean : clean-build clean-docs clean-mypy clean-pycache clean-ruff clean-test # # Clean all artifacts
You can’t perform that action at this time.
0 commit comments