Optional pytype install on Windows (no CI) (#12669)

This commit is contained in:
Avasam
2024-09-17 04:58:31 -04:00
committed by GitHub
parent 3266319a76
commit d34ef50754
8 changed files with 33 additions and 37 deletions

View File

@@ -5,7 +5,6 @@ range of Python users and Python codebases. If you're trying a type
checker on your Python code, your experience and what you can contribute
are important to the project's success.
## The contribution process at a glance
1. [Prepare your environment](#preparing-the-environment).
@@ -51,10 +50,10 @@ please refer to this
Note that some tests require extra setup steps to install the required dependencies.
### Linux/Mac OS
### Linux/Mac OS/WSL
On Linux and Mac OS, you will be able to run the full test suite on Python
3.9, 3.10, or 3.11.
3.9-3.12.
To install the necessary requirements, run the following commands from a
terminal window:
@@ -67,24 +66,22 @@ $ source .venv/bin/activate
### Windows
If you are using a Windows operating system, you will not be able to run the pytype
tests, as pytype
[does not currently support running on Windows](https://github.com/google/pytype#requirements).
One option is to install
[Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/faq),
which will allow you to run the full suite of tests. If you choose to install
WSL, follow the Linux/Mac OS instructions above.
If you do not wish to install WSL, run the following commands from a Windows
terminal to install all non-pytype requirements:
Run the following commands from a Windows terminal to install all requirements:
```powershell
> python -m venv .venv
> .venv\scripts\activate
> .venv\Scripts\activate
(.venv) > pip install -U pip
(.venv) > pip install -r "requirements-tests.txt"
```
To be able to run pytype tests, you'll also need to install it manually
as it's currently excluded from the requirements file:
```powershell
(.venv) > pip install -U pytype
```
## Code formatting
The code is formatted using [`Black`](https://github.com/psf/black).