Commit Graph

8 Commits

Author SHA1 Message Date
Alex Waygood
8a2bc88409 Improve typechecking of the test suite (#9806) 2023-03-08 08:35:41 +00:00
Avasam
75f47d0cb1 Typecheck typeshed's code with pyright (#9793)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-02-22 18:53:07 +00:00
Alex Waygood
880c0da404 Enable some more mypy lints when checking our own code (#9787) 2023-02-21 00:54:35 +00:00
Alex Waygood
a7f1d3c08d Improve mypy flags for regr_test.py and typecheck_typeshed.py (#9441)
- Remove redundant flags that are now enabled by default
- Add `--pretty` to `typecheck_typeshed.py`
2023-01-02 12:01:44 +00:00
Alex Waygood
b53843ab46 Add infrastructure allowing for test cases for third-party stubs (#8700)
- Move the logic for running mypy on the test cases from `tests/mypy_test.py` to a separate script, `tests/regr_test.py`.
- Add the necessary logic in order to be able to have test cases for third-party stubs.
- Move logic common to `tests/mypy_test.py` and `tests/regr_test.py` into `tests/colors.py`, and rename `tests/colors.py` to `tests/utils.py`.
- Add a new check to `tests/check_consistent.py`, to enforce the use of `# pyright: reportUnnecessaryTypeIgnoreComment=true` comments in third-party test cases. These are essential if we want to have our tests against false-negatives work with pyright.
- Update the relevant documentation to account for the new test file.
- Add a new job to the `tests.yml` GitHub workflow, to run the new test in CI.
- Add a simple proof-of-concept test case for `requests`, as a regression test for #7998.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2022-09-08 16:51:33 +01:00
Alex Waygood
86a34c5bd6 typecheck_typeshed.py: Make dir command-line argument positional-only (#8646) 2022-08-31 09:14:53 +01:00
Alex Waygood
15f74295d2 Add aiohttp and tomlkit to requirements-tests.txt (#8605) 2022-08-24 23:08:54 +01:00
Alex Waygood
875f0ca7fc mypy_test.py: Move type-checking of our tests and scripts into a different test (#8587) 2022-08-22 17:16:03 +01:00