aboutsummaryrefslogtreecommitdiffstats
path: root/community/mirage/0001-Update-mypy-dev-requirement-to-0.812.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/mirage/0001-Update-mypy-dev-requirement-to-0.812.patch')
-rw-r--r--community/mirage/0001-Update-mypy-dev-requirement-to-0.812.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/community/mirage/0001-Update-mypy-dev-requirement-to-0.812.patch b/community/mirage/0001-Update-mypy-dev-requirement-to-0.812.patch
new file mode 100644
index 0000000000..b3a2d6177a
--- /dev/null
+++ b/community/mirage/0001-Update-mypy-dev-requirement-to-0.812.patch
@@ -0,0 +1,50 @@
+From 27fef14710a70b59f9e8c395d56f3bd5a3e0db55 Mon Sep 17 00:00:00 2001
+From: miruka <miruka@disroot.org>
+Date: Fri, 12 Mar 2021 17:24:37 -0400
+Subject: [PATCH] Update mypy dev requirement to 0.812+
+
+Noticable improvement: no longer throws errors when using
+aiofiles 0.6+ functions.
+---
+ requirements-dev.txt | 2 +-
+ src/backend/utils.py | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/requirements-dev.txt b/requirements-dev.txt
+index da75be37..d7560afd 100644
+--- a/requirements-dev.txt
++++ b/requirements-dev.txt
+@@ -2,7 +2,7 @@ remote_pdb >= 2.0.0, < 3
+ pdbpp >= 0.10.2, < 0.11
+ devtools >= 0.4.0, < 0.5
+
+-mypy >= 0.790, < 0.800
++mypy >= 0.812, < 0.900
+ flake8 >= 3.8.4, < 4
+ flake8-isort >= 4.0.0, < 5
+ flake8-bugbear >= 20.1.4, < 21
+diff --git a/src/backend/utils.py b/src/backend/utils.py
+index 3586bd38..3cb6078e 100644
+--- a/src/backend/utils.py
++++ b/src/backend/utils.py
+@@ -166,7 +166,7 @@ async def guess_mime(file: File) -> str:
+ if isinstance(file, io.IOBase):
+ file.seek(0, 0)
+ elif isinstance(file, AsyncBufferedIOBase):
+- await file.seek(0, 0) # type: ignore
++ await file.seek(0, 0)
+
+ try:
+ first_chunk: bytes
+@@ -186,7 +186,7 @@ async def guess_mime(file: File) -> str:
+ if isinstance(file, io.IOBase):
+ file.seek(0, 0)
+ elif isinstance(file, AsyncBufferedIOBase):
+- await file.seek(0, 0) # type: ignore
++ await file.seek(0, 0)
+
+
+ def plain2html(text: str) -> str:
+--
+2.31.1
+