improve the documentation for the typing example with the pytest plugin

- remove "Mypy" from the typing example because mypy does not have a language server and therefore does not have auto-completion
- add note about using pylance

Signed-off-by: DetachHead <57028336+DetachHead@users.noreply.github.com>
This commit is contained in:
DetachHead 2024-10-25 23:20:56 +10:00 committed by GitHub
parent 9707e97867
commit fa18076f49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -99,7 +99,7 @@ See [Running Tests](./running-tests.md) for general information on `pytest` opti
## Examples
### Configure Mypy typings for auto-completion
### Configure typings for auto-completion
```py title="test_my_application.py"
from playwright.sync_api import Page
@ -109,6 +109,8 @@ def test_visit_admin_dashboard(page: Page):
# ...
```
If you're using VSCode with Pylance, these types can be inferred by enabling the `python.testing.pytestEnabled` setting so you don't need the type annotation.
### Configure slow mo
Run tests with slow mo with the `--slowmo` argument.