summary refs log tree commit diff
path: root/mypy.ini
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2021-10-06 20:12:36 +0100
committerDavid Robertson <davidr@element.io>2021-10-06 20:25:46 +0100
commitdb6001f922c64be00277932a4c86d037920b35ad (patch)
tree6376a2a71c73915beb3e1fa6f3cf75d9da6cc4fa /mypy.ini
parentpyOpenSSL has type stubs (diff)
downloadsynapse-db6001f922c64be00277932a4c86d037920b35ad.tar.xz
Pillow has type stubs
Had to make some more invasive changes to our media code. I replaced our
naughty calls to `_getdecoder` with calls to [check_codec], introduced
about seven years ago.

[check_codec]: https://github.com/python-pillow/Pillow/commit/799e8312cb6ede52d83d96f9ae414fb8ba457154

mypy didn't like our use of `_getexif`. The [Pillow 3.1.0 release
notes][pillow-3.1] describe this as

> private, experimental, but generally widely used

There's a public `getexif()` without an underscore, but that's only
available since [Pillow 6.0.0][pillow-6]

[pillow-3.1]: https://pillow.readthedocs.io/en/stable/releasenotes/3.1.0.html#jpegimageplugin-getexif
[pillow-6]: https://pillow.readthedocs.io/en/stable/releasenotes/6.0.0.html#added-exif-class
Diffstat (limited to 'mypy.ini')
-rw-r--r--mypy.ini3
1 files changed, 0 insertions, 3 deletions
diff --git a/mypy.ini b/mypy.ini
index 3adae6b1c1..0ae2b894a9 100644
--- a/mypy.ini
+++ b/mypy.ini
@@ -247,9 +247,6 @@ ignore_missing_imports = True
 [mypy-phonenumbers.*]
 ignore_missing_imports = True
 
-[mypy-PIL.*]
-ignore_missing_imports = True
-
 [mypy-prometheus_client.*]
 ignore_missing_imports = True