Commit Graph

36 Commits

Author SHA1 Message Date
Jelle Zijlstra
17f8a82376 ast: mark ast.Num etc. as deprecated (#10994) 2023-11-08 19:40:22 +01:00
Alex Waygood
c63dd5941f Improve how we run pyright in CI (#10258)
Avoid using the deprecated `--venv-path` command-line argument
2023-06-23 09:26:19 +01:00
Alex Waygood
d208d5a833 Pyright: create a more isolated environment in CI for testing stubs (#10121) 2023-05-01 19:02:45 +01:00
Avasam
965b3108fe Further improve and simplify pyright configuration (#9714) 2023-02-12 22:42:23 +01:00
Alex Waygood
60789273a2 Improve pyright verification of third-party test cases in CI (#9650)
Co-authored-by: Avasam <samuel.06@hotmail.com>
2023-02-07 11:53:54 +00:00
Alex Waygood
e2d67bf703 Delete stubs for cryptography (#9459)
Typeshed's stubs for `paramiko` and `pyOpenSSL` now depend on the `cryptography` package, which now provides inline types at runtime
2023-01-10 22:16:11 +00:00
Avasam
23ac9bff19 Check for unused pyright: ignore and differentiate from mypy ignores (#9397) 2022-12-28 10:44:29 +00:00
Avasam
4a6d277733 Simplify pyrightconfigs by removing redundant keys (#9293) 2022-11-28 18:35:35 +00:00
Nikita Sobolev
6cd33f951d Exclude stubs/cryptoghraphy from CI to fix pyright (#9258)
Fix pyright
2022-11-23 13:18:03 +00:00
Nikita Sobolev
50da0aa19c Add $schema to pyrightconfig.json (#8957) 2022-10-21 10:47:45 +02:00
Alex Waygood
fd4feba2c9 Enable pyright's reportUnnecessaryTypeIgnoreComment setting for the whole test_cases directory (#8683) 2022-09-05 15:20:04 +02:00
Sebastian Rittau
faae950ade Use error codes for type ignores (#8280)
Disable reportSelfClsParameterName for pytype as this is out of typeshed's
control

Closes: #7497
2022-07-12 20:15:49 +02:00
Alex Waygood
78d96cd17e Drop support for Python 2 (#8272) 2022-07-12 09:08:56 +02:00
Alex Waygood
6b0c8df9ec Upgrade pyright, improve pyright config files (#8072) 2022-06-16 18:50:50 +01:00
Jelle Zijlstra
1aa546d07d pyright: turn off reportPropertyTypeMismatch (#7985) 2022-05-30 09:20:28 +02:00
Alex Waygood
2773480d13 Add regression tests for builtins.pow and object.__reduce__ (#7663) 2022-04-21 21:17:37 -07:00
Sebastian Rittau
108b6fb091 pyright: Don't report incompatible overrides (#7498)
These overrides are inherited from the implementation and are out of
typeshed's control.
2022-03-16 16:20:06 +01:00
Alex Waygood
39c8202eaf Increase pyright strictness when checking __all__ (#7356) 2022-03-02 03:31:21 -08:00
Alex Waygood
69abe56e18 pyrightconfig.json: correct typo in comment (#7355)
Typeshed has no factions, only fractions :)
2022-02-22 06:44:16 -08:00
Akuli
230f149539 Remove unnecessary pyrightconfig excludes (#6271) 2021-11-09 20:00:59 +02:00
Jake Bailey
2912ab0092 Update pyright to 1.1.175 (#6110) 2021-10-04 18:17:24 -07:00
Jon Dufresne
4381e0a558 Remove @python2-only third party stubs that aren't also dependencies (#5975)
Closes #5969
2021-08-30 14:23:28 +02:00
Jon Dufresne
9d02cd265d Remove leftover openssl-python in pyright configuration (#5976)
The package was renamed in a98fceca2f.
2021-08-28 19:05:24 +02:00
Jon Dufresne
33b08cb3d7 Remove leftover pyright tornado configuration (#5974)
tornado was removed in 5a7f25584e.
2021-08-28 08:29:40 -07:00
Eric Traut
59624ff09c Updated pyright version to 1.1.160 (#5857)
* Updated pyright version to 1.1.160. Older versions contained a bug that prevented multiple third-party stub packages from having the same top-level module name.

* Disabled "reportUnsupportedDunderAll" diagnostic check for now.

Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-08-06 09:21:57 +02:00
Sebastian Rittau
bc2ec748f6 Move routes stubs to @python2 directory (#5637)
* Move routes stubs to @python2 directory

* Ignore Python-2-only stubs for stubtest

* Use standard idiom for re-exporting items

Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-06-18 17:05:23 +03:00
Jake Bailey
c4dc935b3f Add a stricter config pass for pyright (#5612) 2021-06-10 20:10:12 +02:00
Sebastian Rittau
711580722b Enable pyright for all Python 3 stubs (#5597)
* pyright: disable reportUnknownParameterType

Unknown parameter types are preferred over Any annotations for
incomplete stubs. Especially larger stubs are expected to be
incomplete for some time and it would be a shame to lose the
other pyright warnings for those stubs.

* Also disable reportUnknownVariableType

Fix problems with tkinter

* Disable reportUnknownMemberType

Fix pyright problems
2021-06-09 07:14:22 -07:00
Jake Bailey
61320cb191 Clean up pyrightconfig.json (#5481) 2021-05-17 09:28:01 +02:00
Akuli
97101b1d2c create stub for __main__ (#5354)
* create stub for __main__

* exclude from pyright, like all other __getattr__ incomplete stubs
2021-05-06 18:57:33 +03:00
Jukka Lehtosalo
8bd3e16eef Add back module-level __getattr__ to encodings (#5261)
This is needed for submodules, such as `encodings.cp437`.
2021-04-28 07:45:15 -07:00
Eric Traut
faa5c70f25 Added missing type information for encodings module (#5106)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-03-10 17:18:32 -08:00
Eric Traut
c92e3cb228 Update pyright CI test to use the latest version of pyright (1.1.118). (#5092)
Update pyright CI test to use the latest version of pyright (1.1.118). Enable all but one of pyright's strictest checks. Add a "# type: ignore" to `__new__` method in `weakref.KeyRef` because it uses a non-standard name for the `cls` parameter, which is flagged as an error by pyright.

Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-03-05 12:12:18 -08:00
Jake Bailey
0fa7e73027 Run pyright on matrix of platforms and python versions (#5072)
* Run pyright on matrix of platforms and python versions

* Drop 3.10 from matrix, as it fails
2021-02-25 16:24:32 -08:00
Eric Traut
4b4ced5fa0 Added missing type annotations and type arguments (#5070)
Co-authored-by: Eric Traut <erictr@microsoft.com>
Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com>
2021-02-25 15:09:58 -08:00
Jake Bailey
c00c7258ea Add pyright to test suite, pyrightconfig.json (#5059)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-02-23 23:07:42 +01:00