Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96450b17 authored by Martin Fischer's avatar Martin Fischer
Browse files

[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.
parent 3cd5ce55
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -50,8 +50,8 @@ search.checker.%: install
	$(Q)./manage pyenv.cmd searx-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"

PHONY += test ci.test test.shell
ci.test: test.yamllint test.black test.pylint test.unit test.robot test.rst
test:    test.yamllint test.black test.pylint test.unit test.robot test.rst test.shell
ci.test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst
test:    test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst test.shell
test.shell:
	$(Q)shellcheck -x -s dash \
		dockerfiles/docker-entrypoint.sh
+1 −1
Original line number Diff line number Diff line
@@ -689,7 +689,7 @@ test.pyright() {
    nodejs.ensure
    # We run Pyright in the virtual environment because Pyright
    # executes "python" to determine the Python version.
    pyenv.cmd pyright
    pyenv.cmd pyright -p pyrightconfig-ci.json
    dump_return $?
}

pyrightconfig-ci.json

0 → 100644
+10 −0
Original line number Diff line number Diff line
{
    "venvPath": "local",
    "venv": "py3",
    "include": [
        "searx",
        "searxng_extra",
        "tests"
    ],
    "typeCheckingMode": "off"
}