Skip to content

Commit e0cc0ae

Browse files
committed
added a mypy debug
1 parent dbe1069 commit e0cc0ae

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

scripts/common.Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,21 @@ mypy: $(REPO_BASE_DIR)/mypy.ini ## runs mypy python static type-checker on this
173173
$(CURDIR)/src
174174

175175

176+
.PHONY: mypy-debug
177+
mypy-debug: $(REPO_BASE_DIR)/mypy.ini ## runs mypy with profiling and reporting enabled
178+
@rm -rf $(CURDIR)/.mypy-report
179+
@mkdir -p $(CURDIR)/.mypy-report
180+
@mypy \
181+
--config-file=$(REPO_BASE_DIR)/mypy.ini \
182+
--show-error-context \
183+
--show-traceback \
184+
--verbose \
185+
--linecount-report $(CURDIR)/.mypy-report \
186+
--any-exprs-report $(CURDIR)/.mypy-report \
187+
$(CURDIR)/src \
188+
| tee $(CURDIR)/.mypy-report/mypy.logs
189+
190+
176191
.PHONY: codestyle
177192
codestyle codestyle-ci: ## enforces codestyle (isort & black) finally runs pylint & mypy
178193
@$(SCRIPTS_DIR)/codestyle.bash $(if $(findstring -ci,$@),ci,development) $(shell basename "${SRC_DIR}")

0 commit comments

Comments
 (0)