Skip to content

Commit 6bfeb73

Browse files
committed
annoying mypy errors
1 parent 5a49d4c commit 6bfeb73

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

tests/http2_server.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222

2323
from quart import Quart, request
2424
try:
25-
from quart.static import send_file # noqa # mypy#8823 # type: ignore[attr-defined]
25+
from quart.static import send_file # type: ignore[attr-defined] # mypy#8823
2626
except ImportError:
27-
from quart.helpers import send_file # noqa # mypy#8823 # type: ignore[attr-defined, no-redef] # mypy#1153
27+
from quart.helpers import send_file # type: ignore[attr-defined, no-redef] # mypy#1153
2828

2929
try:
30-
from quart.exceptions import HTTPStatusException # noqa # mypy#8823 # type: ignore[attr-defined]
30+
from quart.exceptions import HTTPStatusException # type: ignore[attr-defined]
3131
except ImportError:
32-
from werkzeug.exceptions import InternalServerError as HTTPStatusException # noqa # mypy#8823 # type: ignore[no-redef] # mypy#1153
32+
from werkzeug.exceptions import InternalServerError as HTTPStatusException # type: ignore[no-redef] # mypy#1153
3333

3434
app = Quart(__name__)
3535

tests/system_tests_websockets.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
try:
2424
import websockets
2525
except ImportError:
26-
websockets = None # noqa # type: ignore[assignment] # expression has type "None", variable has type Module
26+
websockets = None # type: ignore[assignment] # expression has type "None", variable has type Module
2727

2828
from system_test import Qdrouterd
2929
from system_test import main_module, TestCase, Process

tests/tox.ini.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ disable =
222222

223223
[mypy]
224224
warn_redundant_casts = True
225-
warn_unused_ignores = True
225+
# enable when wanting to clean up ignores
226+
# warn_unused_ignores = True
226227

227228
# mypy cannot handle overridden attributes
228229
# https://github.com/python/mypy/issues/7505

0 commit comments

Comments
 (0)