Commit e9758473 authored by Newbyte's avatar Newbyte 🌜 Committed by Leo
Browse files

community/mirage: enable tests

parent 8048ea6b
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
......@@ -39,10 +39,15 @@ makedepends="
tiff-dev
zlib-dev
"
checkdepends="
py3-flake8
py3-mypy
"
_commit_hsluv_c=9e9be32d6010cad484a7b12b1a3d19c6cf4c1353
source="
mirage-v$pkgver.tar.gz::https://github.com/mirukana/mirage/archive/v$pkgver.tar.gz
hsluv-c.tar.gz::https://github.com/hsluv/hsluv-c/archive/$_commit_hsluv_c.tar.gz
0001-Update-mypy-dev-requirement-to-0.812.patch
"
prepare() {
......@@ -55,9 +60,14 @@ build() {
make
}
check() {
make test
}
package() {
make INSTALL_ROOT=$pkgdir install
}
sha512sums="af4e6adb33e4fad200947d91592b76115be426c8d5a780bed0cffbbea72189bd513815c2c2aa74ae6e06c6b35e17a2fc47b4350cc57fe27c35f972753b5bb772 mirage-v0.7.1.tar.gz
ecd8c9afa9e22c6a0093435ce89b5d5b1882207359d02a65f6e62952fa4b57fc5b3e1aaa07527553a7e86c350173409b21d41b3da5235a7fb5f96b61944be839 hsluv-c.tar.gz"
ecd8c9afa9e22c6a0093435ce89b5d5b1882207359d02a65f6e62952fa4b57fc5b3e1aaa07527553a7e86c350173409b21d41b3da5235a7fb5f96b61944be839 hsluv-c.tar.gz
3d3f22afe3a3a4510dd7f924795c37552ecc8b1e36fb25b1c289a0164d0ca3dcf243a0d479b3583826f75ae1974d84e0a02d02b4170712c7ba1db269a200e26b 0001-Update-mypy-dev-requirement-to-0.812.patch"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment