`--enable-error-code ignore-without-code` means that mypy will ignore any type: ignore comments that don't have mypy error codes. It doesn't appear to have any effect on type: ignore comments that mypy_test doesn't use (e.g. because they're pyright- or stubtest-specific).
`--strict-equality` means that mypy will raise errors if we do something silly like `if sys.version_info == "linux"`. flake8-pyi should also check this for us, but I don't see any reason not to have mypy check this as well.
* Upgrade pyright to 1.1.230
* Add `type: ignore`s for new pyright checks regarding multiple inheritance
* Temporarily pin pyright-action to 1.0.4, as changes made in 1.0.5 break typeshed's CI
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* Run mypy on the 3.11 stdlib in CI, as a regression test for https://github.com/python/mypy/issues/12220
* Correct the docstring at the top of the file following the changes made in #7478
* Stop the test from crashing when run locally if there's an extra file/folder in the stubs directory.
* Fix `mypy_test.py` so that it actually tests the third-party stubs
* Upgrade to mypy 0.940
* Skip running mypy on `SQLAlchemy` stubs for now, to workaround a mypy crash.
Because we didn't set mypy's clean_exit parameter, it was exiting immediately after checking the stdlib, meaning `mypy_test.py` wasn't checking the third-party stubs at all.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Some distributions can't be tested with stubtest for a variety of
reasons or because of bugs in stubtest. This key:
* let's us keep metadata about a distribution in one place,
* prevents us from modifying the scripts because of issues with a
specific distribution, and
* will trigger tests if only the key is changed.
Fixes#7344 for now.
As discussed in that issue, I think it might make sense to revert the
change to check positional-only arguments on dunders for now, since it
seems to be mostly busywork and has very little benefit for end users.
However, that'll happen on stubtest master, which typeshed isn't yet
ready for.
Co-authored-by: hauntsaninja <>