Commit Graph

271 Commits

Author SHA1 Message Date
Sebastian Rittau
056981b957 Try to fix mypy_primer permissions (#5462)
Cf.  #5459
2021-05-15 14:37:27 +02:00
Sebastian Rittau
f94d838814 Fix primer comment permissions (#5452) 2021-05-15 00:15:55 +02:00
Akuli
5afd250792 mypy_primer: use 'needs: mypy_primer' for comment job (#5428) 2021-05-14 22:28:34 +03:00
Akuli
ceb308d402 run pytype_test in python 3.9 (#5425) 2021-05-12 19:13:01 +03:00
Shantanu
f720ebb71e Fix workflow path matching (#5414)
@Akuli was right in https://github.com/python/typeshed/pull/5407

Co-authored-by: hauntsaninja <>
2021-05-11 10:29:40 +02:00
Shantanu
d5fc9a6a80 Run stubtest_unused on Darwin (#5410)
Fixes #5405

Co-authored-by: hauntsaninja <>
2021-05-11 09:34:10 +03:00
Shantanu
5e6fb40b56 Fix stubtest unused script (#5411)
Contrary to the comment, this wasn't a mypy_primer issue, nor even a
stubtest issue.

Co-authored-by: hauntsaninja <>
2021-05-11 09:24:37 +03:00
Shantanu
ee8364c216 Only run mypy primer workflows on stdlib (#5407)
Co-authored-by: hauntsaninja <>
2021-05-11 09:21:25 +03:00
Akuli
c4d163ad42 fix stubtest-unused-whitelist permissions (#5404) 2021-05-10 22:19:51 +03:00
Akuli
272d70cdd2 Fix several problems in stubtest unused (#5401) 2021-05-10 18:50:37 +02:00
Sebastian Rittau
8787c7f496 Use newer mypy version for mypy_primer (#5397)
This will hopefully fix the mypy primer errors
2021-05-10 17:23:51 +03:00
Sebastian Rittau
5f6dbe3d3e Limit mypy primer comment to 30000 chars (#5396)
* Limit mypy primer comment to 30000 chars

GitHub enforces a limit of 64kB

Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-05-10 16:51:58 +03:00
hatal175
244fc622e6 Add workflow stubtests for macos (#5384)
* Add macos to stubtest

* Add general darwin stubtest exception file

* Adding exceptions and platform ifs
2021-05-09 23:24:00 +03:00
Shantanu
fcdc7a8135 Use full SHA for comment hiding (#5383)
For whatever reason, looks like GA mandates full SHA
This was added in #5364

Co-authored-by: hauntsaninja <>
2021-05-08 16:52:16 -07:00
Akuli
83e875dffb Hide old mypy_primer comments (#5364) 2021-05-08 15:31:08 -07:00
Shantanu
82fa8473ff Attempt to fix stubtest unused PR opening (#5374)
Co-authored-by: hauntsaninja <>
2021-05-09 01:16:04 +03:00
Shantanu
1c76937836 Fix stubtest unused workflow (#5372)
This got broken during modular typeshed

Co-authored-by: hauntsaninja <>
2021-05-07 22:54:03 -07:00
Shantanu
4bf4d6adb6 Bump pyright (#5357)
For #5348

Co-authored-by: hauntsaninja <>
2021-05-06 15:26:24 -07:00
Sebastian Rittau
d16017ba0d Drop mypy self test (#5344)
Closes: #5303
2021-05-06 06:55:49 -07:00
Jake Bailey
a334a29c96 Bump pyright, disable PR/commit commenting for all but one job (#5347)
* Bump pyright, disable PR/commit commenting for now

* Show comments for 3.9

* And only on Linux
2021-05-05 22:49:21 +03:00
Akuli
59390469d6 Run stubtest on python 3.10 (attempt 2) (#5313) 2021-05-04 11:56:51 -07:00
Shantanu
0578e47ffc mypy_primer: reduce polling frequency (#5322)
This should cut down the API rate limiting we see when large numbers of
PRs are submitted.

Note when we used mypyc-compiled mypy in mypy_primer, this took <10m.
This is currently not the case, but hopefully will once again be.

Co-authored-by: hauntsaninja <>
2021-05-02 16:07:43 -07:00
Akuli
7dffcb5c6a Revert "run stubtest on python 3.10 (#5305)" (#5311)
This reverts commit 7590506039.
2021-05-02 12:55:26 -07:00
Akuli
7590506039 run stubtest on python 3.10 (#5305) 2021-05-02 17:46:17 +02:00
Shantanu
31b6d415dc mypy_primer: check conclusion field as well (#5272)
Fixes #5270

The comment workflow waits for the mypy primer to run. I think with
Github's changes to workflow running, these runs get marked as
completed, but have the conclusion "action_required".
E.g., see https://github.com/python/typeshed/pull/5269/checks
2021-04-30 18:07:28 -07:00
Jake Bailey
413276f411 Use pyright-action to run pyright, bump pyright (#5274)
I recently published https://github.com/marketplace/actions/run-pyright, which wraps pyright and uses GHA magic to leave diagnostics on commits / PRs (like https://github.com/jakebailey/pyright-action-test/pull/1/files), plus a faster startup time thanks to GHA tool caching and piggy backing off of the `node` install used in GHA itself (so no `setup-node` needed).

This PR switches to that action and leaves a comment noting that the version number is pinned in two places.

This action is a prototype, but I'm pretty confident in it so far.
2021-04-30 18:06:58 -07:00
Jelle Zijlstra
2c8cb60596 Fix permissions for mypy-primer-comments (#5259)
Based on https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions
2021-04-27 18:05:20 +02:00
Sebastian Rittau
f1cd416dcf Allow comments workflow appropriate permission (#5258) 2021-04-27 00:58:56 -07:00
Sebastian Rittau
7ca219f9c4 Add permissions to all workflows (#5255) 2021-04-26 16:51:35 +02:00
Sebastian Rittau
ba0f2b929b Always generate a comment for mypy_primer (#5197)
This way, runs without output after runs with output can be clearly
determined. This also makes it easier to recognize when a run was not
completed.
2021-04-15 09:18:13 +02:00
Jake Bailey
f626da6553 Bump pyright to 1.1.126, enable 3.10 testing (#5153) 2021-03-30 11:57:55 -07:00
Sebastian Rittau
2b19c761ec Fix build (#5086)
Run the mypy test suite using Ubuntu 18.04. Ubuntu 20.04 doesn't have a package for virtualenv on Python 2.

Also, curses.color_pair() now has a named argument.
2021-03-04 17:11:37 +01: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
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
Shantanu
1959669aa4 mypy_primer: don't fail silently on comment failure (#5002)
Co-authored-by: hauntsaninja <>
2021-02-03 08:35:38 +01:00
Ivan Levkivskyi
e2fd852952 Add more consistency tests (#4983)
Follow up fo #4971

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-29 17:23:35 +00:00
Shantanu
c39f8b942b Run mypy_primer with a newer mypy (#4980) 2021-01-28 20:03:16 -08:00
Shantanu
d7bbc9ea67 Re-enable stubtest (#4979) 2021-01-28 05:22:55 -08:00
Rebecca Chen
ce24720a1a Fix and re-enable pytype_test (#4975)
For now, the test requires changes that have been merged into the pytype master branch but not yet released. I'll update requirements-tests-py3.txt again once I've cut a new release (hopefully later this week).

* Fix pytype_test.
* Re-enable pytype_test.
* Remove continue-on-error from pytype_test.
* Temporarily install pytype from its master branch, as the code to
  support the new directory structure hasn't been released yet.
* Set TYPESHED_HOME before using pytype.pytd.Typeshed().
2021-01-27 22:00:27 +00:00
Ivan Levkivskyi
16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00
Shantanu
12f0be025f mypy_primer: shard across two CI jobs (#4865)
Co-authored-by: hauntsaninja <>
2020-12-28 11:17:39 +01:00
Shantanu
e035760d62 Return mypy_primer to CI (#4806)
Much of the comment script is based off of https://github.com/dawidd6/action-download-artifact

Co-authored-by: hauntsaninja <>
2020-12-14 18:31:30 +01:00
Shantanu
74147313cd Remove mypy_primer (#4795)
Co-authored-by: hauntsaninja <>
2020-11-29 23:03:42 -08:00
Shantanu
20446030c5 Fix stubtest unused cron job (#4782)
Co-authored-by: hauntsaninja <>
2020-11-21 19:36:27 +01:00
Sebastian Rittau
d2a7889fe0 Drop support for Python 3.5 (#4675)
Python 3.5 EOL was on 2020-09-30.
2020-11-02 16:18:20 +01:00
Shantanu
620989bac5 typeshed: update stubtest version (#4739)
* typeshed: update stubtest version

Includes changes from https://github.com/python/mypy/pull/9680
I've already fixed all the true positives on typeshed.

* attempt to fix windows' _WarnFunction

Co-authored-by: hauntsaninja <>
2020-11-01 12:35:21 +01:00
Shantanu
c58a93b928 mypy_primer: speed up, clean up (#4730)
We use tee and no longer try to delete the file based on exit code,
since we use data.trim now.
mypy_primer started failing silently because of changes in aiohttp, so
now we'll fail if the exit codes are not 0 or 1.
Note mypy_primer has --project-date to get around the problem of
breaking changes in projects, but I want to try and keep mypy_primer up
to date / get a feel for how bad this problem actually is.

Co-authored-by: hauntsaninja <>
2020-10-30 09:16:11 +01:00
Sebastian Rittau
c5aca0d533 Only add a mypy_primer comment if there is output (#4725) 2020-10-28 20:07:12 +01:00
Shantanu
25b3004ad8 mypy_primer: post a more informative message (#4719)
Co-authored-by: hauntsaninja <>
2020-10-27 07:47:59 +01:00
Shantanu
fc171339ce mypy_primer: attempt to fix workflow (#4718)
This will take some merge and debug...

Co-authored-by: hauntsaninja <>
2020-10-26 13:03:08 -07:00