Commit Graph

61 Commits

Author SHA1 Message Date
Avasam
a540f78784 Enable Ruff EXE (flake8-executable) (#13346) 2025-01-02 18:34:05 +00:00
Avasam
73ce98b5a3 Enable Ruff N (pep8-naming) on non-stubs (#13327) 2025-01-02 10:22:40 +00:00
Avasam
bff5547abc Use lib/ts_utils for scripts/sync_protobuf (#12913)
- Simplified `download_file` error handling (400+ return codes already raised errors!)
- Moved `update_metadata` from `scripts/sync_protobuf/_utils.py` to `lib/ts_utils/metadata.py`
- Improved `update_metadata` to support any key (values unvalidated atm) and return the modified dictionary
- Updated `scripts/stubsabot.py` to use `update_metadata`
- Updated `scripts/sync_protobuf/*` to use  `lib/ts_utils`
- Updated `scripts/sync_protobuf/tensorflow.py` and `scripts/sync_protobuf/google_protobuf.py` to use the version directly from the `METADATA.toml` file
2024-10-28 11:47:52 +01:00
Sebastian Rittau
2d0f6d8277 Bundle path handling in ts_utils.paths (#12805) 2024-10-17 08:16:10 +02:00
Sebastian Rittau
36fb63ebc8 Support compatible version specifiers (#12771) 2024-10-17 08:15:30 +02:00
Sebastian Rittau
a2d6d5315b [stubsabot] Use common functions from ts_utils (#12772) 2024-10-14 15:41:28 +02:00
Sebastian Rittau
1fa4986f71 Move common utility functions to a common library (#12773) 2024-10-14 08:00:02 +02:00
sobolevn
7c26da22bd Fix str2bool failure on stubsabot dry-run (#12287) 2024-07-06 13:42:15 -07:00
Sebastian Rittau
311612ed38 [stubsabot] Improve error message (#12273)
Cf. #12272
2024-07-04 10:01:57 +01:00
sobolevn
db7dd4cd54 Replace Github -> GitHub in scripts/stubsabot.py (#12228) 2024-06-27 17:15:16 +02:00
Sebastian Rittau
425c69a6b9 Prefix utility modules with underscore (#11999) 2024-05-22 09:35:11 -04:00
Alex Waygood
4872c30a98 Fix divider lines in stubtest_third_party.py (#11799) 2024-04-20 17:10:28 -07:00
Alex Waygood
7c8e82fe48 Improve the output of tests/stubtest_third_party.py when it fails (#11763) 2024-04-14 23:23:25 +01:00
Sebastian Rittau
87900248b0 Update label names used by bots (#11650) 2024-03-23 12:20:36 +01:00
Alex Waygood
5c75292f26 stubsabot: Skip over empty __init__.py files when determining if all Python files are covered by py.typed markers (#11634)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-03-20 20:54:47 +00:00
Sebastian Rittau
0b1e5d3f34 stubsabot: Skip test files in diff analysis (#11606) 2024-03-15 13:08:40 +01:00
renovate[bot]
48106feed7 chore(deps): update pytype and pyright (#11595) 2024-03-14 09:28:09 +01:00
Avasam
da69247514 Code improvements from new Ruff checks (#11498) 2024-02-28 22:30:18 -08:00
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
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
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
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
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
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
Alex Waygood
a035372a91 Bump various test dependencies (#10028) 2023-04-10 13:58:26 +01: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
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
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
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
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
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