py-topdir.mk: Make pyright optional
Be prepared to not have working pyright. This is necessary, because the next commit will remove it for Debian.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
f8ce42fc7c
commit
b2f0fe2595
1 changed files with 7 additions and 1 deletions
|
|
@ -1,5 +1,4 @@
|
|||
TD_COPY_FILES += pyproject.toml
|
||||
TD_GENERATE_FILES += pyrightconfig.json
|
||||
|
||||
PY_CHECK_EXCLUDE ?=
|
||||
PY_SRC_ROOT += $(wildcard $(TOPDIR)/src $(TOPDIR)/tools)
|
||||
|
|
@ -12,6 +11,11 @@ ifndef PY_CHECK_YAPF
|
|||
PY_CHECK_YAPF := $(firstword $(wildcard /usr/bin/yapf /usr/bin/yapf3))
|
||||
endif
|
||||
|
||||
ifndef PY_CHECK_PYRIGHT
|
||||
PY_CHECK_PYRIGHT := $(shell which pyright 2>/dev/null)
|
||||
TD_GENERATE_FILES += pyrightconfig.json
|
||||
endif
|
||||
|
||||
all:
|
||||
|
||||
format: py-format
|
||||
|
|
@ -24,7 +28,9 @@ ifneq ($(PY_CHECK_RUFF),)
|
|||
$(PY_CHECK_RUFF) check $(addprefix --exclude ,$(PY_CHECK_EXCLUDE)) $(PY_SRC_ROOT)
|
||||
endif
|
||||
mypy $(addprefix --exclude ,$(PY_CHECK_EXCLUDE)) $(PY_SRC_ROOT)
|
||||
ifneq ($(PY_CHECK_PYRIGHT),)
|
||||
pyright
|
||||
endif
|
||||
|
||||
py-check-format:
|
||||
ifneq ($(PY_CHECK_YAPF),)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue