Browse Source

Import NoReturn from typing module

This no longer needs the mypy-extensions library, so it can be
eliminated now.
merge-requests/85/head
Deimos 5 years ago
parent
commit
3acb382187
  1. 1
      tildes/requirements-dev.in
  2. 3
      tildes/tildes/models/user/user.py
  3. 2
      tildes/tildes/views/login.py
  4. 3
      tildes/tildes/views/shortener.py

1
tildes/requirements-dev.in

@ -3,7 +3,6 @@ black
freezegun freezegun
ipython ipython
mypy mypy
mypy-extensions
prospector prospector
pyramid-debugtoolbar pyramid-debugtoolbar
pyramid-ipython pyramid-ipython

3
tildes/tildes/models/user/user.py

@ -4,9 +4,8 @@
"""Contains the User class.""" """Contains the User class."""
from datetime import datetime, timedelta from datetime import datetime, timedelta
from typing import Any, List, Optional, Sequence, Tuple
from typing import Any, List, NoReturn, Optional, Sequence, Tuple
from mypy_extensions import NoReturn
from pyotp import TOTP from pyotp import TOTP
from pyramid.security import ( from pyramid.security import (
ALL_PERMISSIONS, ALL_PERMISSIONS,

2
tildes/tildes/views/login.py

@ -3,10 +3,10 @@
"""Views related to logging in/out.""" """Views related to logging in/out."""
from typing import NoReturn
from urllib.parse import unquote_plus from urllib.parse import unquote_plus
from marshmallow.fields import String from marshmallow.fields import String
from mypy_extensions import NoReturn
from pyramid.httpexceptions import HTTPFound, HTTPUnauthorized, HTTPUnprocessableEntity from pyramid.httpexceptions import HTTPFound, HTTPUnauthorized, HTTPUnprocessableEntity
from pyramid.renderers import render_to_response from pyramid.renderers import render_to_response
from pyramid.request import Request from pyramid.request import Request

3
tildes/tildes/views/shortener.py

@ -3,7 +3,8 @@
"""Views related to the link shortener.""" """Views related to the link shortener."""
from mypy_extensions import NoReturn
from typing import NoReturn
from pyramid.httpexceptions import HTTPMovedPermanently from pyramid.httpexceptions import HTTPMovedPermanently
from pyramid.request import Request from pyramid.request import Request
from pyramid.security import NO_PERMISSION_REQUIRED from pyramid.security import NO_PERMISSION_REQUIRED

Loading…
Cancel
Save