Commit Graph
100 Commits
Author SHA1 Message Date
Shantanuandhauntsaninja 55cf343ba9 zip: update for PEP 618 (#6123)
Resolves #6122

Co-authored-by: hauntsaninja <>
2021-10-06 12:54:47 -07:00
Shantanuandhauntsaninja c7ac9b6641 markdown: fix type of Pattern (#6115)
Surfaced weirdly by #6109

Co-authored-by: hauntsaninja <>
2021-10-04 21:35:26 -07:00
Shantanuandhauntsaninja 67e8979ac1 stubtest_third_party: more newlines in printing (#6060)
Co-authored-by: hauntsaninja <>
2021-09-21 23:16:12 +02:00
Shantanu 8576b344b8 binhex: removed in py311 (#6011) 2021-09-10 15:27:24 -07:00
Shantanuandhauntsaninja c74fd22931 Update pytype (#6026)
Co-authored-by: hauntsaninja <>
2021-09-11 01:11:05 +03:00
Shantanuandhauntsaninja 2d4fcbc81e zipfile: py310 changes, fix open (#5979)
Co-authored-by: hauntsaninja <>
2021-08-28 22:45:01 +02:00
Shantanuandhauntsaninja ba998cd5f9 multiprocessing.pool: fix __init__ methods (#5833)
Co-authored-by: hauntsaninja <>
2021-08-28 12:04:08 -07:00
Shantanuandhauntsaninja 670929e908 dateparser: use PEP 604 (#5977)
Co-authored-by: hauntsaninja <>
2021-08-28 21:03:02 +02:00
Shantanuandhauntsaninja f6e4c9c38f Check for PEP 604 usage in CI (#5903)
Since this is a common review issue and our stubs have all been
converted

Co-authored-by: hauntsaninja <>
2021-08-28 11:37:50 -07:00
Shantanuandhauntsaninja 98846a65e2 More shards for stubtest_third_party (#5902)
Co-authored-by: hauntsaninja <>
2021-08-09 13:36:54 -07:00
Shantanuandhauntsaninja 76eeeee4c4 [minor] Clearer formatting for stubtest_third_party output (#5856)
Co-authored-by: hauntsaninja <>
2021-08-05 20:16:46 -07:00
Shantanu 41f4f0f00f xxhash: add seed arguments, reset method, missing attributes (#5802)
Update version in METADATA.toml
2021-07-24 14:55:22 +02:00
Shantanu 04f0113d16 dataclasses: work around default factory issues (#5718) 2021-07-01 08:07:00 +02:00
Shantanu 7244ea1f71 Test third party stubs with stubtest (#5615) 2021-06-13 00:17:40 +02:00
Shantanuandhauntsaninja 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
Shantanu 04fb7ceb3c builtins: add a getattr overload for bool (#5518)
As brought up in https://github.com/python/typeshed/pull/5516

Alternatives include:
- Use another type var that has a value restriction
- Doing something fancy with Protocols that have a __bool__ that returns
  a Literal (which may not work)
- Doing nothing
2021-05-29 07:09:38 -07:00
Shantanuandhauntsaninja 74a8900166 mock: fix overloads (#5534)
* mock: fix overloads

Fixes #5533. This changes the order and in some cases removes default
values from new.

* ignore incompatible overlaps

Co-authored-by: hauntsaninja <>
2021-05-26 22:16:51 +02:00
Shantanu 4bfdba71cb dataclasses: update for py310 (#5525) 2021-05-25 14:43:06 +02:00
Shantanuandhauntsaninja 05f91f73b3 Re-enable mypy test suite (#5526)
Fixes #5505, in combination with https://github.com/python/mypy/pull/10527

Co-authored-by: hauntsaninja <>
2021-05-25 09:42:18 +01:00
Shantanu 6bb1d885c6 time: fix constants availability (#5419) 2021-05-12 08:35:39 +02:00
Shantanuandhauntsaninja 4df940f96d Update allowlists (#5417)
Co-authored-by: hauntsaninja <>
2021-05-11 22:11:48 -07:00
Shantanuandhauntsaninja dd73f117f0 os: fix positional-only args (#5412)
Co-authored-by: hauntsaninja <>
2021-05-11 10:47:12 +02:00
Shantanuandhauntsaninja a30ef0db04 pwd: fix positional-only args (#5413)
Co-authored-by: hauntsaninja <>
2021-05-11 10:46:26 +02:00
Shantanuandhauntsaninja 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
Shantanuandhauntsaninja d5fc9a6a80 Run stubtest_unused on Darwin (#5410)
Fixes #5405

Co-authored-by: hauntsaninja <>
2021-05-11 09:34:10 +03:00
Shantanuandhauntsaninja 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
Shantanuandhauntsaninja ee8364c216 Only run mypy primer workflows on stdlib (#5407)
Co-authored-by: hauntsaninja <>
2021-05-11 09:21:25 +03:00
ShantanuhauntsaninjaAkuli
a91c89ea94 various path stubs: re-export to reduce duplication (#5382)
Co-authored-by: hauntsaninja <>
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-05-10 22:27:13 -07:00
Shantanuandhauntsaninja 0ac3531a93 Update allowlists (#5409)
Co-authored-by: hauntsaninja <>
2021-05-10 22:19:31 -07:00
Shantanu 482d38044b statistics: update for py310 (#5291) 2021-05-10 15:12:06 -07:00
Shantanuandhauntsaninja 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
Shantanuandhauntsaninja 82fa8473ff Attempt to fix stubtest unused PR opening (#5374)
Co-authored-by: hauntsaninja <>
2021-05-09 01:16:04 +03:00
Shantanuandhauntsaninja 9cdd5220c2 Update allowlists (#5376)
Co-authored-by: hauntsaninja <>
2021-05-08 12:48:12 -07:00
Shantanuandhauntsaninja 3fa5988a2a Fix allowlist updater script (#5375)
Co-authored-by: hauntsaninja <>
2021-05-07 23:13:36 -07:00
Shantanuandhauntsaninja 1c76937836 Fix stubtest unused workflow (#5372)
This got broken during modular typeshed

Co-authored-by: hauntsaninja <>
2021-05-07 22:54:03 -07:00
Shantanuandhauntsaninja 7619a8fb46 typing_extensions: fix positional-only arg (#5359)
Co-authored-by: hauntsaninja <>
2021-05-06 17:07:43 -07:00
Shantanuandhauntsaninja bdd5680e7a Bump pytype (#5358)
For #5345

Co-authored-by: hauntsaninja <>
2021-05-06 15:33:08 -07:00
Shantanuandhauntsaninja 4bf4d6adb6 Bump pyright (#5357)
For #5348

Co-authored-by: hauntsaninja <>
2021-05-06 15:26:24 -07:00
Shantanuandhauntsaninja 4a45b1d1b4 enum: update for py310 (#5314)
I remember there are some subtleties around Enum.__new__, that might be
relevant to StrEnum, but I'm forgetting the details.

I wasn't sure how best to handle the new enum.property. I could also
re-export, or take a more literal interpretation.

Co-authored-by: hauntsaninja <>
2021-05-04 15:12:19 +03:00
Shantanu 1826072dd1 asyncio.subprocess: remove loop in py310 (#5315) 2021-05-02 18:56:45 -07:00
Shantanu 3950543bce traceback: update for py310 (#5316)
I think technically you need to pass both of value and tb or neither, so
let me know if you think it's worth all the overloads
2021-05-02 18:54:47 -07:00
Shantanuandhauntsaninja 63c4f0b9e5 lzma: mark positional-only args (#5320)
Co-authored-by: hauntsaninja <>
2021-05-02 18:51:48 -07:00
Shantanu 2d10d2779f multiprocessing.pool: fix ApplyResult.__init__ (#5318) 2021-05-02 18:50:45 -07:00
Shantanu acef37018c readline: fix stubtest errors (#5326) 2021-05-02 17:01:19 -07:00
Shantanu c80a2debe2 site: main is documented and exists in py3 (#5324) 2021-05-02 17:00:59 -07:00
Shantanu 2dd0871c0c inspect: add missing definitions (#5321) 2021-05-02 17:00:46 -07:00
Shantanuandhauntsaninja 11f012a2b6 html.parser: complete stub (#5323)
Co-authored-by: hauntsaninja <>
2021-05-02 16:24:34 -07:00
Shantanuandhauntsaninja 9c50d38506 calendar: add firstweekday property (#5325)
Co-authored-by: hauntsaninja <>
2021-05-02 16:17:54 -07:00
Shantanuandhauntsaninja 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
Shantanu 11c673b681 contextlib: add aclosing in py310 (#5317)
* contextlib: add aclosing in py310

* use protocols for closing, aclosing
2021-05-02 14:53:06 -07:00
Shantanu 06709912ad termios: mark positional-only args (#5312) 2021-05-02 13:13:43 -07:00
Shantanu a744c3746f ast: update for py310 (#5293) 2021-05-02 13:02:14 -07:00
Shantanuandhauntsaninja 59bf496479 typing: ParamSpec uses kw-only args (#5310)
Co-authored-by: hauntsaninja <>
2021-05-02 12:52:13 -07:00
Shantanuandhauntsaninja 00039ee354 array: update for py310 (#5294)
Co-authored-by: hauntsaninja <>
2021-05-02 12:32:29 -07:00
Shantanuandhauntsaninja ae60825818 sqlite3: fix argument names, positional only (#5300)
Co-authored-by: hauntsaninja <>
2021-05-02 12:32:19 -07:00
Shantanuandhauntsaninja 851c187287 xml.dom.minidom: add missing definitions (#5280)
Co-authored-by: hauntsaninja <>
2021-05-02 12:04:41 -07:00
Shantanu 3c49b1def4 xxlimited: yes, even you get updated for py310 (#5301) 2021-05-02 06:33:29 -07:00
Shantanuandhauntsaninja cc55c923ac pprint: add underscore_numbers everywhere for py310 (#5299)
Co-authored-by: hauntsaninja <>
2021-05-02 06:29:18 -07:00
Shantanuandhauntsaninja 75e196e18a formatter, parser, _bootlocale: remove for py310 (#5298)
Co-authored-by: hauntsaninja <>
2021-05-02 06:24:30 -07:00
Shantanu 9dcdb6f99c os.path: add strict to realpath in py310 (#5297) 2021-05-02 06:23:37 -07:00
Shantanu 21e174a192 inspect: update for py310 (#5296) 2021-05-02 06:21:03 -07:00
Shantanu 0db864f6b5 base64: update for py310 (#5295) 2021-05-02 06:19:48 -07:00
Shantanuandhauntsaninja 056e493691 glob: update for py310 (#5292)
Co-authored-by: hauntsaninja <>
2021-05-01 22:16:41 -07:00
Shantanu 1517438aba builtins: more updates for py310 (#5290) 2021-05-01 21:58:39 -07:00
Shantanu 537aec0466 xml.dom.minicompat: complete stub (#5281) 2021-05-01 21:39:54 -07:00
Shantanuandhauntsaninja 0ea437f02a builtins: use SupportsLessThan over SupportsLessThanT if possible (#5288)
Co-authored-by: hauntsaninja <>
2021-05-01 21:39:25 -07:00
Shantanu 445a86f4c9 builtins: add aiter, anext (#5289) 2021-05-01 21:10:30 -07:00
Shantanu 3aa1f2d42f typing: update and fix for py310 (#5287) 2021-05-01 21:09:26 -07:00
Shantanu 2d69d1a695 bisect: update for py310 (#5282) 2021-05-01 20:58:30 -07:00
Shantanu 26f3748741 asyncio.tasks: update for py310 (#5283)
Just removing the loop argument from various places
2021-05-01 20:29:58 -07:00
Shantanu 1416e63ce2 itertools: add pairwise (#5285) 2021-05-01 20:25:45 -07:00
Shantanu fa3bdfa612 symbol: removed in py310 (#5284) 2021-05-01 20:23:48 -07:00
Shantanu d36420146e _curses: fix positional-only args (#5279) 2021-05-02 00:34:20 +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
Shantanuandhauntsaninja fc660d6d41 Move typing_extensions to stdlib (#5233)
I'm not sure what the best way to do this is. This effectively orphans
types-typing-extensions, but maybe that's not really a problem. (We can
yank the package too)

See https://github.com/python/typeshed/pull/5229#issuecomment-822234125
for some details

Co-authored-by: hauntsaninja <>
2021-04-20 21:55:48 -07:00
Shantanu 3d8bffae80 pkgutil: returns a List[str] usually (#5222)
Yes, technically it returns whatever its first argument is if it isn't
a list.

Doing this because https://github.com/python/mypy/pull/9454#issuecomment-820661189
2021-04-15 12:43:53 -07:00
Shantanu fa9d5a5e9f future first: switch the order of some if statements (#5206)
Since we're adding this to our contribution guidelines in
https://github.com/python/typeshed/pull/5205
2021-04-11 06:44:18 -07:00
Shantanuandhauntsaninja 54392b1e12 allowlist new "not a function" errors (#5155)
stubtest now checks this for overloads as well (previously it didn't,
due to some combination of laziness, that this used to short circuit and
prevent signature checking, and the fact that these are all not super
helpful)

Co-authored-by: hauntsaninja <>
2021-03-29 22:44:18 -07:00
Shantanuandhauntsaninja e380432825 comment on memoryview.cast (#5118)
Co-authored-by: hauntsaninja <>
2021-03-15 17:26:47 -07:00
Shantanuandhauntsaninja 38a1c344c9 Small fixes for Python 3.10 (#5044)
This is enough to get stubtest working (note that it's a little annoying
to install mypy currently since typed-ast seems to have broken again on
Python 3.10)

Co-authored-by: hauntsaninja <>
2021-02-20 18:44:36 -08:00
Shantanuandhauntsaninja 1959669aa4 mypy_primer: don't fail silently on comment failure (#5002)
Co-authored-by: hauntsaninja <>
2021-02-03 08:35:38 +01: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
Shantanuandhauntsaninja bcba4f4fce runpy: return globals dict (#4965)
Fixes #4964

Co-authored-by: hauntsaninja <>
2021-01-23 13:06:26 +01:00
Shantanuandhauntsaninja eb9d995362 allowlist ctypes.wintypes (#4961)
The unused cronjob removed this for unclear reasons in #4935

Co-authored-by: hauntsaninja <>
2021-01-21 18:46:10 -08:00
Shantanu 053e0df0a5 Stub for ossaudiodev (#4944) 2021-01-19 20:25:02 +01:00
Shantanu b4e447d70a builtins: complex doesn't define __complex__ (#4945) 2021-01-18 12:01:37 +01:00
Shantanuandhauntsaninja 8a46859e0b multiprocessing.pool: fix constants (#4938)
Co-authored-by: hauntsaninja <>
2021-01-17 17:07:59 -08:00
Shantanu c4f3207437 functools: fix singledispatch (#4942)
This is tricky, but should match the runtime logic better.

Fixes #4408
2021-01-17 17:01:17 -08:00
Shantanu 5df4c3d275 dataclasses: various fixes (#4937) 2021-01-17 16:54:08 -08:00
Shantanu 8de9b856e4 itertools: fix postional-only args, stubtest whitelist (#4936) 2021-01-16 13:31:11 +01:00
Shantanuandhauntsaninja c3854d26f6 migrate_script: prefix @ to python2 (#4931)
As suggested by Jukka in https://github.com/python/typeshed/issues/2491

Co-authored-by: hauntsaninja <>
2021-01-15 09:27:30 -08:00
Shantanu c893857f46 itertools: fix signature of accumulate (#4933)
Resolves #4888
2021-01-14 21:07:14 +01:00
Shantanuandhauntsaninja 6a53e992fe itertools.tee: use positional-only args (#4934)
Co-authored-by: hauntsaninja <>
2021-01-14 08:41:39 +01:00
Shantanuandhauntsaninja 484c014665 Suffix T to type variable names (#4898)
* _MessageType to _MessageT

* _default to _T

* _TConnection to _ConnectionT, _TListener to _ListenerT

* _Number to _NumberT

* _MessageVar to _MessageT

* _Type to _TypeT

* _ArgType to _T

* _Ch to _CharT

Co-authored-by: hauntsaninja <>
2021-01-04 09:03:32 +01:00
Shantanuandhauntsaninja 781430fdf1 multiprocessing: improve Server (#4886)
Co-authored-by: hauntsaninja <>
2021-01-02 00:54:28 +01:00
Shantanuandhauntsaninja 0a8fd098ca ast: remove docstring attribute (#4868)
As mentioned in #4760

Co-authored-by: hauntsaninja <>
2020-12-29 08:43:15 +01:00
Shantanuandhauntsaninja 12f0be025f mypy_primer: shard across two CI jobs (#4865)
Co-authored-by: hauntsaninja <>
2020-12-28 11:17:39 +01:00
Shantanuandhauntsaninja bc3ed283df ctypes.wintypes can be imported on linux in 3.9.1 (#4858)
See https://bugs.python.org/issue16396

Co-authored-by: hauntsaninja <>
2020-12-26 16:01:23 +01:00
Shantanuandhauntsaninja 32420769cd Revert "Remove unused stubtest whitelist entries (#4839)" (#4842)
This reverts commit fcc2416d43.

Co-authored-by: hauntsaninja <>
2020-12-19 23:24:35 -05:00