mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 02:41:00 +00:00
[mod] add test.pyright to test & ci.test targets
Since we currently have many type checking errors, we for now only test with typeCheckingMode: off which makes pyright only check files that contain a comment: # pyright: basic to enable basic type checking, or # pyright: strict to enable strict type checking.
This commit is contained in:
parent
3cd5ce55e8
commit
96450b17d4
3 changed files with 13 additions and 3 deletions
4
Makefile
4
Makefile
|
@ -50,8 +50,8 @@ search.checker.%: install
|
||||||
$(Q)./manage pyenv.cmd searx-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
|
$(Q)./manage pyenv.cmd searx-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
|
||||||
|
|
||||||
PHONY += test ci.test test.shell
|
PHONY += test ci.test test.shell
|
||||||
ci.test: test.yamllint test.black test.pylint test.unit test.robot test.rst
|
ci.test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst
|
||||||
test: test.yamllint test.black test.pylint test.unit test.robot test.rst test.shell
|
test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst test.shell
|
||||||
test.shell:
|
test.shell:
|
||||||
$(Q)shellcheck -x -s dash \
|
$(Q)shellcheck -x -s dash \
|
||||||
dockerfiles/docker-entrypoint.sh
|
dockerfiles/docker-entrypoint.sh
|
||||||
|
|
2
manage
2
manage
|
@ -689,7 +689,7 @@ test.pyright() {
|
||||||
nodejs.ensure
|
nodejs.ensure
|
||||||
# We run Pyright in the virtual environment because Pyright
|
# We run Pyright in the virtual environment because Pyright
|
||||||
# executes "python" to determine the Python version.
|
# executes "python" to determine the Python version.
|
||||||
pyenv.cmd pyright
|
pyenv.cmd pyright -p pyrightconfig-ci.json
|
||||||
dump_return $?
|
dump_return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
10
pyrightconfig-ci.json
Normal file
10
pyrightconfig-ci.json
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"venvPath": "local",
|
||||||
|
"venv": "py3",
|
||||||
|
"include": [
|
||||||
|
"searx",
|
||||||
|
"searxng_extra",
|
||||||
|
"tests"
|
||||||
|
],
|
||||||
|
"typeCheckingMode": "off"
|
||||||
|
}
|
Loading…
Reference in a new issue