Commit Graph

24 Commits

Author SHA1 Message Date
Alex Waygood b4e97a1909 Improve __enter__ & constructor methods (#7114) 2022-02-02 22:14:59 +01:00
Jelle Zijlstra de5ec6a0d1 fix incorrect tuple[T] (#6996)
Found from PyCQA/flake8-pyi#135.
2022-01-22 09:37:14 -08:00
Alex Waygood 96c9abb058 Always use _typeshed.Self, where applicable (#6880)
* Always use `_typeshed.Self`, where applicable

* Revert changes to `google-cloud-ndb` (ambiguous)

* Remove empty line added by script

* Revert changes to `stubs/python-dateutil/dateutil/relativedelta.pyi`

* Manually add a few more that the script missed

* Improve `filelock` annotation

Source code here: https://github.com/tox-dev/py-filelock/blob/79ec7b2826e33b982fe83b057f359448b9d966ba/src/filelock/_api.py#L207

* Improve `opentracing/scope` annotation

Source code here: https://github.com/opentracing/opentracing-python/blob/3e1d357a348269ef54d67f761302fab93dbfc0f7/opentracing/scope.py#L71

* Improve `redis/client` stub

Source code here: https://github.com/redis/redis-py/blob/15f315a496c3267c8cbcc6d6d9c6005ea4d4a4d5/redis/client.py#L1217

* Improve `redis/lock` annotation

Source code here: https://github.com/redis/redis-py/blob/15f315a496c3267c8cbcc6d6d9c6005ea4d4a4d5/redis/lock.py#L155

* Improve `requests/models` annotation

Source code here: https://github.com/psf/requests/blob/d718e753834b84018014a23d663369ac27d1ab9c/requests/models.py#L653
2022-01-09 19:16:19 -08:00
Alex Waygood a40d79a4e6 Use lowercase type everywhere (#6853) 2022-01-08 16:09:29 +01:00
Luca Chiodini 3b73acb06b Pillow: Image fixes (#6848)
* Fix return type of `Image.transform()`.
* Add animation attributes to `Image`.
2022-01-07 17:08:30 +01:00
Sebastian Rittau 4f4068243a Upgrade stubs to Pillow 9 (#6795)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2022-01-05 14:17:56 +02:00
Alex Waygood 8d5d2520ac Use PEP 585 syntax wherever possible (#6717) 2021-12-28 11:31:43 +01:00
Sebastian Rittau 8b5feeb101 Remove PIL.__main__ (#6665) 2021-12-22 23:17:40 +01:00
Anthony Sottile 3bf165d723 correct border= and fill= kwargs for ImageOps.expand (#6641) 2021-12-20 17:47:01 -08:00
Akuli a5bc1e037f Add mypy error codes to '# type: ignore' comments (#6379) 2021-11-26 07:07:56 +01:00
Sebastian Rittau 9f86972350 Add star to all non-0.1 versions (#6146) 2021-10-11 13:41:19 -07:00
Nikita Sobolev 2eadf9c174 Annotate PIL.ImageColor (#6151) 2021-10-11 18:20:02 +02:00
Nikita Sobolev 023c4dff67 Color arguments also take (r,g,b,a) tuples (#6148) 2021-10-11 14:56:59 +02:00
Fares Ahmed d8ec167681 Fix type of stroke_width parameter in Pillow's ImageDraw.*text* functions (#6008) 2021-09-06 13:13:28 +02:00
SeenicRoot 034a5f6aec Fix return type of Image.reduce() in Pillow (#5946)
Image.reduce() should return an Image instead of None.
2021-08-22 20:03:22 -07:00
Jacob Walls 5e0012569d Change stub of Pillow.Image.new() to accept str for color argument (#5851) 2021-08-06 10:56:12 +02:00
Akuli fdf073627c maybe fix stubtest (#5746)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-07-09 12:06:26 +03:00
Sebastian Rittau 788b20e326 Upgrade Pillow stubs for Pillow 8.3 (#5731)
* Upgrade Pillow stubs for Pillow 8.3

* stubtest: ignore PIL._tkinter_finder

* Annotate TiffTags.py

* Pillow: stubtest and various other fixes

* Remove tkinter modules from stubtest_allowlist
2021-07-08 18:22:07 -07:00
Jake Bailey bb981bd726 Merge last of PIL stubs from Pylance (#5706)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-06-29 21:05:04 -07:00
Jake Bailey 6b8f047b05 Update some PIL stubs (#5692)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-06-28 10:29:17 -07:00
Sebastian Rittau d3ba8a3858 Pillow: fix errors found by stubtest (#5629)
* Update Pillow stubtest allowlist

* Update cryptography allowlist
2021-06-13 15:15:51 +03:00
Sebastian Rittau a3a355433d Add missing Pillow stubs (#5626)
These were generated with stubgen and then slightly hand edited, mostly
by fixing imports and a few other bits and bobs.
2021-06-12 18:38:59 -07:00
Shantanu 7244ea1f71 Test third party stubs with stubtest (#5615) 2021-06-13 00:17:40 +02:00
Sebastian Rittau 5d811e18b5 Add rudimentary Pillow stubs (#5594)
* Add rudimentary Pillow stubs

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-06-09 17:36:46 +03:00