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
Nipunn Koorapati
35064a7f75
Bump to mypy-protobuf 3.2.0 ( #7013 )
2022-01-23 14:49:33 -08:00
Nipunn Koorapati
fc4ba3ac64
Bump protobuf to 3.19.2 ( #6879 )
2022-01-10 10:03:41 +01:00
Akuli
950cff21f6
create_baseline_stubs.py: Fix stubgen invocation ( #6856 )
2022-01-08 12:33:29 +01:00
Nikita Sobolev
de8beb1399
Run shellcheck on generate_proto_stubs.sh ( #6709 )
2021-12-26 23:41:05 +01:00
Sebastian Rittau
34721fcadc
Make create_baseline_stubs script executable ( #6511 )
2021-12-06 13:49:32 +02:00
Sebastian Rittau
206e1ae91b
Remove 'py3' from requirements filename ( #6509 )
2021-12-06 12:59:04 +02:00
Nipunn Koorapati
39867f1096
Bump protobuf stub to 3.18.1 and mypy-protobuf 3.0.0 ( #6157 )
...
* Bump protobuf stub to 3.18.1 and mypy-protobuf 3.0.0
* Fix ConsumeInteger in google/protobuf/text_format.pyi
The arg was removed in protobuf 3.18
2021-10-12 14:33:22 -07:00
Sebastian Rittau
9f86972350
Add star to all non-0.1 versions ( #6146 )
2021-10-11 13:41:19 -07:00
Akuli
afad78343a
change prints in scripts/create_baseline_stubs.py ( #6051 )
2021-09-19 12:38:23 -07:00
Nipunn Koorapati
581b2d5180
Update protobuf generated stubs from mypy-protobuf 2.8 ( #5804 )
2021-07-23 16:21:26 -07:00
Jukka Lehtosalo
b3b8daed2e
Fix import sorting in create_baseline_stubs script ( #5781 )
...
Run isort before black since changes made by isort don't follow stub
conventions.
2021-07-15 13:24:46 +02:00
Jukka Lehtosalo
d85c54dc47
Add simple tool for creating baseline stubs ( #5777 )
...
This tool is a simple wrapper around stubgen and other tools that simplifies the
creation of "baseline" stubs with minimal annotation coverage. These stubs allow
basic type checking (e.g. number of arguments, whether X is valid as a base class),
and once we have baseline stubs, it's easy to contribute incremental changes that
add type annotations.
Here's a summary of what the tool does:
1. Check that the package is installed
2. Run stubgen
3. Copy generated stubs to the correct directory under `stubs/`
4. Run black
5. Run isort
6. Generate basic metadata with correct package version
7. Update pyright exclusions (needed since there are missing types)
8. Print suggestions about next steps needed to contribute stubs to typeshed
For example, to generate stubs for `iso8601`, you can run it like this:
```
python scripts/create_baseline_stubs.py iso8601
```
Sometimes the project name is different from the runtime package name. In
this case run the tool with `--package <runtime-package>`.
2021-07-15 11:22:28 +01:00
Nipunn Koorapati
42eec29eed
Update proto stubs with latest mypy-protobuf 2.6 ( #5753 )
2021-07-10 17:10:39 -07:00
Shantanu
e66ceceed0
Rename whitelist to allowlist ( #5614 )
...
Resolves #4436
I want to add stubtest for third party stubs, and figured it'd be easier
to make this change now.
Co-authored-by: hauntsaninja <>
2021-06-10 14:33:44 -07:00