aboutsummaryrefslogtreecommitdiffstats
path: root/community/mirage/0001-Update-mypy-dev-requirement-to-0.812.patch
blob: b3a2d6177aae8689b8777c4a2e68fcc098c44158 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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