Skip to content

Commit

Permalink
annoying mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jiridanek committed Dec 2, 2023
1 parent 3e8b3d0 commit 44dd9fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions tests/http2_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@

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

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

app = Quart(__name__)

Expand Down
2 changes: 1 addition & 1 deletion tests/system_tests_websockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
try:
import websockets
except ImportError:
websockets = None # noqa # type: ignore[assignment] # expression has type "None", variable has type Module
websockets = None # type: ignore[assignment] # expression has type "None", variable has type Module

from system_test import Qdrouterd
from system_test import main_module, TestCase, Process
Expand Down
3 changes: 2 additions & 1 deletion tests/tox.ini.in
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ disable =

[mypy]
warn_redundant_casts = True
warn_unused_ignores = True
# enable when wanting to clean up ignores
# warn_unused_ignores = True

# mypy cannot handle overridden attributes
# https://github.com/python/mypy/issues/7505
Expand Down

0 comments on commit 44dd9fa

Please sign in to comment.