Commit Graph

104 Commits

Author SHA1 Message Date
Alex Waygood
a40e683784 Teach stubsabot to be smarter about the required locations of py.typed files (#11053) 2023-11-22 22:49:58 +00:00
Alex Waygood
519a7dfcb8 Improve a few dataclass reprs in stubsabot (#11050) 2023-11-21 14:20:16 +00:00
Avasam
49ba409da8 Replace isort with Ruff (#10912) 2023-10-27 20:14:38 -07:00
Jelle Zijlstra
f9f30cc0f2 Update mypy-protobuf (#10914)
Co-authored-by: Avasam <samuel.06@hotmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-22 16:31:02 -07:00
Avasam
35873ec3d8 Doc: Use proper name capitalization of tooling (Ruff, Black, Flake8) (#10913) 2023-10-18 23:46:53 +01:00
Ali Hamdan
db3f84e5c2 Allow specifying python version in runtests script (#10881)
This makes the script usable for packages that do not support the minimum
python version hardcoded in the script.

Another part of #10722
2023-10-13 23:37:12 +02:00
Alex Waygood
e1b60060ec Do a dry run of stubsabot on PRs touching scripts/ or tests/ (#10508) 2023-09-22 20:36:21 -07:00
Shantanu
a3f4418e90 Fix stubsabot handling of post releases (#10667)
Fixes #10666
2023-09-06 12:06:07 +02:00
Akuli
a785041250 create_baseline_stubs.py: Improve pyright config file editing (#10629)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-30 17:43:46 +03:00
Alex Waygood
0692576dab create_baseline_stubs.py: ensure generated METADATA.toml files end with a newline (#10627) 2023-08-29 16:37:28 +02:00
Shantanu
23679a0cb8 stubsabot: avoid validating diff info url (#10620)
It looks like all the timeouts are happening in the get_diff_info code.
I don't think we really need to validate the URL exists. In any case, we
probably end up hitting a very similar endpoint later in analyze_diff.
2023-08-26 19:34:57 -07:00
Sebastian Rittau
cfc671f6bd Use Python 3.8 in runtests.py (#10600)
We only support running mypy using 3.8+ up, since mypy 1.5 dropped
support for running with Python 3.7.

Closes: #10599
2023-08-21 11:30:13 +02:00
Alex Waygood
0d8a6bc200 Add more checks in parse_metadata.py for the upstream_repository field (#10513) 2023-07-28 14:04:58 +01:00
Sebastian Rittau
47905d2d19 stubsabot: Add stubsabot label to PRs (#10507) 2023-07-25 17:40:11 +02:00
Sebastian Rittau
9b94bd4e5f stubsabot: Add distributions argument (#10505)
[stubsabot] Add distributions argument

This allows to specify which explicitly which distributions to update.
Useful for testing.
2023-07-25 06:40:55 -07:00
Alex Waygood
2887f60196 Use ruff, not pycln, for removing unused imports (#10498) 2023-07-22 12:14:27 +01:00
Alex Waygood
49a2371d7a Auto-add upstream URLs in create_baseline_stubs.py (#10491)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2023-07-21 15:56:53 +01:00
Sebastian Rittau
26e8b9c68a [stubsabot] Include repository in issue text (#10488)
Also, get GitHub repository for diff from METADATA.toml, instead of
scraping it from PyPI.
2023-07-20 17:22:15 +02:00
Sebastian Rittau
afe18e95a9 Add an upstream_repository field to METADATA.toml (#10487)
Closes: #10478
2023-07-20 16:45:41 +02:00
Alex Waygood
79e092e133 Add some ruff autofixes to CI (#10458) 2023-07-20 14:41:52 +02:00
Alex Waygood
7289fb9f77 Stubsabot: Fix incorrect diff link when a py.typed was added in a micro version (#10375) 2023-06-28 11:48:11 +02:00
Alex Waygood
d32754c336 Stubsabot: mark stubs as obsolete, even if the py.typed file was added in a micro version (#10368) 2023-06-27 20:17:17 +01:00
Nikita Sobolev
a2457367d0 Remove emoji stubs (#10160)
Remove `emoji` stubs, refs #8760
2023-05-09 09:28:11 +01:00
Avasam
1caac913ea Add stubdefaulter to create_baseline_stubs.py (#10127) 2023-05-02 11:31:34 +01:00
Avasam
2f9ba99c21 Restore error output in runtests.py (#10110) 2023-04-29 18:17:26 +01:00
Nikita Sobolev
2bfb6d8212 Fix CI, use new termcolor version (#10079) 2023-04-24 07:17:23 -07:00
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