mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 03:05:48 +03:00
50 lines
1.6 KiB
Diff
50 lines
1.6 KiB
Diff
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
|
|
|