Commit Graph

128 Commits

Author SHA1 Message Date
Avasam 08e6e4ced9 Add pyright testcases / regression tests to the runtests script (#10002)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-04-14 11:11:21 +01:00
Alex Waygood a035372a91 Bump various test dependencies (#10028) 2023-04-10 13:58:26 +01:00
Mehdi Drissi 1d15121f1d Tensorflow protobuf stubs (#9873)
Co-authored-by: Mehdi Drissi <mdrissi@snapchat.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-03-15 00:51:16 -07:00
Shantanu aac3863752 stubsabot: fix legacy version parsing (#9866)
New `packaging` is strict and doesn't like paramiko's pokemon versioning
scheme from 2004

Fixes #9865
2023-03-10 23:30:53 -08:00
Alex Waygood 8a2bc88409 Improve typechecking of the test suite (#9806) 2023-03-08 08:35:41 +00:00
Alex Waygood 1d2ae2598b Fix some typos in comments (#9802) 2023-02-23 22:11:24 +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 9163c71e47 [Minor] Simplify some type hints in stubsabot (#9785)
We can use `typing_extensions.Self` now
2023-02-20 16:32:22 -08:00
Avasam ed6748fb32 Stubtest settings: change ignore_missing_stub default to false (#9779)
If you're reading about this commit from an autogenerated changelog entry, this should have no user-visible impact on how the stubs are interpreted by a type checker; it's just an internal change to how typeshed's tests work.
2023-02-20 22:37:45 +00:00
Avasam 74112dc189 Add a run_stubtest flag to scripts/runtests.py (#9717)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-02-19 22:10:32 +00:00
Alex Waygood 70c027e9ef Fix broken stubsabot logic in find_first_release_with_py_typed (#9760) 2023-02-19 14:22:51 +00:00
Avasam 1db405b15c stubsabot: minor refactoring (#9754) 2023-02-18 14:25:04 -08:00
Alex Waygood 9cd20ce095 Improve stubsabot logic for finding the first release with a py.typed file (#9600) 2023-01-28 18:03:25 +00:00
Avasam 46f0d918ef A more accurate termcolor.colored fallback (#9435) 2022-12-31 22:52:26 +00:00
Alex Waygood beb19fea4c runtests.py: point pycln to pyproject.toml for config settings (#9202)
An oversight in #9197 that was noticed by @Avasam post-merge (thanks!)
2022-11-15 09:40:22 -08:00
Alex Waygood efa1048d42 stubsabot: warn if stubtest is skipped in CI (for real this time) (#9133)
Fixes a bug in #8681. The logic currently is broken; there should have been a warning message in the PR body for #9118, but there wasn't.
2022-11-08 08:33:17 -08:00
Sebastian Rittau 3aaf6b9999 'master' branch was updated to 'main' (#9045) 2022-11-01 12:57:57 +01:00
Nipunn Koorapati f43ee406f1 Bump mypy-protobuf to 3.4.0 (#8951) 2022-10-21 01:26:57 +01:00
Nipunn Koorapati bcad078264 types-protobuf: Bump the rev of protobuf supported to 4.21.8 (#8937) 2022-10-20 23:23:53 +01:00
Samuel T c4361674ac Fix issues with finding stubs in scripts/runtest (#8896) 2022-10-13 20:11:23 -07:00
Samuel T 573ee94f35 All scripts/tests: always specify file encoding in calls to open() (#8882) 2022-10-11 22:29:36 +01:00
Alex Waygood aeb16b155b stubsabot: only update existing branches if the diff relative to master would be different (#8854) 2022-10-05 17:35:20 -07:00
Shantanu 9b5ea00fed stubsabot: add some debug logs (#8850)
For #8778
2022-10-04 15:05:17 -07:00
Alex Waygood 1fc58e5413 Use stubgen's --export-less option in create_baseline_stubs.py (#8843) 2022-10-04 10:58:51 -07:00
Alex Waygood 477bfa2e92 Stubsabot: Add analysis of the diff to the PR body (#8817) 2022-10-04 10:14:39 -07:00
Shantanu 807f3a8fc6 Update open stubsabot PRs (#8813)
Fixes #8778

Note that not fixing this has some advantages, particularly if stubsabot
waits a little while after releases before making PRs (as discussed
earlier). Specifically, it gives us more coverage of upstream versions
and might provide a natural division of changes, compared to PRs that
make updates corresponding to several upstream versions.
2022-10-04 08:07:25 -07:00
Samuel T e5d52a39d4 Script to run all checks locally (#8798)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-10-04 07:21:10 -07:00
Samuel T f511f1f4e9 Allow create_baseline_stubs.py to add packages to existing stub (#8809) 2022-09-30 15:49:58 +01:00
Alex Waygood 2e50b58ca9 Link earliest version with py.typed in stubsabot obsoletion PRs (#8775)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-09-20 23:37:21 +01:00
Alex Waygood 876c9bf6af stubsabot: fix two GitHub diff link bugs (#8767) 2022-09-19 11:13:16 -07:00
Shantanu 67c858408d Upgrade to termcolor>=2 (#8766) 2022-09-19 08:17:30 +02:00
Alex Waygood 2eaa63b8fa stubsabot: checkout the branch you were on after script completion (#8742) 2022-09-18 12:52:03 +01:00
Alex Waygood a4e5ad8aab stubsabot: link to diff between releases on GitHub, where possible (#8744) 2022-09-15 17:11:31 -07:00
Alex Waygood 5a3595a5d6 stubsabot: refuse to run if uncommitted changes are present locally (#8741) 2022-09-15 13:45:53 -07:00
Alex Waygood 2fd0180bb1 stubsabot: Add the PR body to the commit message (#8740) 2022-09-15 20:12:35 +01:00
Alex Waygood 3a397a2252 stubsabot: improve argparse for --action-level (#8682) 2022-09-04 16:16:05 -07:00
Alex Waygood eb6431c4cc stubsabot: warn if stubtest won't test an update (#8681)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-09-04 13:56:58 -07:00
Samuel T bfe56cd471 create_baseline_stubs: fix pyright config on windows, write to stubs (#8653) 2022-09-02 14:53:37 -07:00
Alex Waygood bc26a98bd7 create_baseline_stubs.py: Modernize a few type annotations (#8642) 2022-08-29 13:49:00 +01:00
Alex Waygood c8a679657b Delete scripts/update-stubtest-allowlist.py (#8606) 2022-08-29 13:50:26 +02:00
Nipunn Koorapati 7beaebff40 Bump to mypy-protobuf 3.3.0 (#8612)
* Bump to mypy-protobuf 3.3.0

* Remove some ignores for formatting
2022-08-26 07:24:11 +01:00
Nipunn Koorapati c17c0d5607 Bump protobuf to 3.20.1 (#8609)
There are even newer versions available (4.*), but I had found a bug
in it which prevented it from working with mypy-protobuf. For now,
sticking to just 3.20.1
2022-08-25 13:28:08 +01:00
Kevin Kirsche bd7a02fad4 refactor: prefer f-strings to other format/concatentation styles (#8474) 2022-08-03 14:04:27 +02:00
Shantanu 936314b979 Add stubsabot Github Action (#8303) 2022-07-17 13:21:51 -07:00
Shantanu b941cfffde create_baseline_stubs: check all defs by default (#8227)
Since stubgen will usually create definition complete stubs, we should have
stubtest check missing definitions so we can know to reflect any future
additions.

Co-authored-by: hauntsaninja <>
2022-07-06 22:55:29 +05:30
Shantanu a9fb8c5119 stubsabot: add project links (#8158)
See https://github.com/python/typeshed/pull/8157 for an example
2022-06-25 06:42:48 -07:00
Alex Waygood a527bf27d5 Run mypy on the scripts directory in CI (#8133) 2022-06-22 14:13:38 +01:00
Shantanu c31baed61d [stubsabot] add script (#8035) 2022-06-17 21:52:36 -07:00
Rogdham 6e0520a9bd create_baseline_stubs: improve package detection (#7283) 2022-02-19 12:20:10 -08:00
Nipunn Koorapati 470ea31ccd Use relax_strict_optional_primitives on protobuf generated code (#7038)
Per the suggestion in https://github.com/dropbox/mypy-protobuf/issues/344
This generates more permissive constructors (which protobuf itself actually
accepts).

Philosophically, I think it makes sense for the generated code hosted on
typeshed to be most permissive, while the generated code of individual
projects can make individual decisions (defaulting to less permissive).
2022-01-28 17:37:57 -08:00