From 96a73d3ea59609d92a9d3e84bb4d3949e5614388 Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl Date: Fri, 15 Nov 2024 12:00:00 +0100 Subject: [PATCH] docs: Complete the transition from pyre to pyright Signed-off-by: Bernhard Kaindl --- CONTRIBUTING.md | 5 ++--- README.md | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 910602de..8ba18bc9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,13 +50,12 @@ This project uses `tox` to run the tests for different python versions. Intro: > A comprehensive beginner's introduction to `tox`":_ > https://www.seanh.cc/2018/09/01/tox-tutorial/ -`tox` runs `pytest`, `pylint` and static analysis using `mypy`, `pyre`, `pytype`, and `pyright`. +`tox` runs `pytest`, `pylint` and static analysis using `mypy`, `pytype`, and `pyright`. Links: - https://mypy.readthedocs.io/en/stable/ - https://microsoft.github.io/pyright/ - https://google.github.io/pytype/ -- https://pyre-check.org/ With `tox`, developers can run the full test suite for Python 2.7 and 3.x. The same test suite is used in GitHub CI: @@ -78,7 +77,7 @@ Using pip-tools, you can extract the requirements and extras from `pyptoject.tom ```bash PYTHON=python3.10 -EXTRAS=.,test,mypy,pyre,pytype,tox +EXTRAS=.,test,mypy,pytype,tox PFLAGS="--no-warn-conflicts" $PYTHON -m pip install pip-tools==7.3.0 $PYTHON -m piptools compile --extra=$EXTRAS -o - pyproject.toml | diff --git a/README.md b/README.md index 2f24022a..fa00abca 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ The Continuous Integration Tests feature: - Checking of the combined coverage against the diff to master: Fails if changes are not covered! - Pylint report in the GitHub Action Summary page, with Warning and Error annotatios, even in the code review. - Check that changes don't generate pylint warnings (if warning classes which are enabled in .pylintrc) -- Static analysis using `mypy`, `pyre` and `pytype` +- Static analysis using `mypy`, `pylint`, `pyright` and `pytype` This enforces that any change (besides whitespace): @@ -72,7 +72,6 @@ For the installation of the general development dependencies, visit [INSTALL.md] - Test with `python2.7 -m pytest` - Run `mypy` (without any arguments - The configuration is in `pyproject.toml`) - Run `./pytype_runner.py` -- Run `./pyre_runner.py` - Run `tox -e py36-lint` and fix any `Pylint` warnings - Run `tox -e py310-covcombine-check` and fix any missing diff-coverage. - Run `tox` for the full CI test suite @@ -86,7 +85,7 @@ The list of `virtualenvs` configured in tox can be shown using this command: `to $ tox -av default environments: py36-lint -> Run in a py36 virtualenv: Run pylint and fail on warnings remaining on lines in the diff to master -py311-pyre -> Run in a py311 virtualenv: Run pyre for static analyis, only passes using: tox -e py311-pyre +py311-pyright -> Run in a py311 virtualenv: Run pyright for static analyis py38-pytype -> Run in a py38 virtualenv: Run pytype for static analyis, intro: https://youtu.be/abvW0mOrDiY py310-covcombine-check -> Run in a py310 virtualenv: Generate combined coverage reports with py27-test coverage merged Run mypy for static analyis @@ -100,7 +99,7 @@ test -> Run in a python virtualenv: Run pytest in this environ If you have only one version of Python3, that works too. Use: `tox -e py-test` -## Static analysis using mypy, pyre, pyright and pytype +## Static analysis using mypy, pylint, pyright and pytype The preconditions for using static analysis with `mypy` (which passes now but has only a few type comments) and `pyright` are present now and `mypy` is enabled in `tox`