Browse Source

Update mypy to 0.760

An improvement to type inference for collection types was added, which
allowed me to eliminate one annotation.
merge-requests/88/head
Deimos 5 years ago
parent
commit
fb7b0cb473
  1. 10
      tildes/requirements-dev.txt
  2. 2
      tildes/tildes/models/user/user.py

10
tildes/requirements-dev.txt

@ -21,7 +21,6 @@ gunicorn==20.0.4
html5lib==1.0.1
hupper==1.9.1 # via pyramid
idna==2.8 # via requests
importlib-metadata==1.3.0 # via pluggy, pytest
ipython-genutils==0.2.0 # via traitlets
ipython==7.10.2
isort==4.3.21 # via pylint
@ -32,9 +31,9 @@ mako==1.1.0 # via alembic, pyramid-mako
markupsafe==1.1.1 # via jinja2, mako, pyramid-jinja2
marshmallow==3.3.0
mccabe==0.6.1 # via prospector, pylint
more-itertools==8.0.2 # via pytest, zipp
more-itertools==8.0.2 # via pytest
mypy-extensions==0.4.3 # via mypy
mypy==0.750
mypy==0.760
packaging==19.2 # via pytest
parso==0.5.2 # via jedi
pastedeploy==2.0.1 # via plaster-pastedeploy
@ -82,7 +81,7 @@ python-editor==1.0.4 # via alembic
pyyaml==5.2
qrcode==6.1
redis==3.3.11
regex==2019.12.9 # via black
regex==2019.12.19 # via black
repoze.lru==0.7 # via pyramid-debugtoolbar
requests==2.22.0
requirements-detector==0.6 # via prospector
@ -102,7 +101,7 @@ toml==0.10.0 # via black
traitlets==4.3.3 # via ipython
transaction==3.0.0 # via pyramid-tm, zope.sqlalchemy
translationstring==1.3 # via pyramid
typed-ast==1.4.0 # via astroid, black, mypy
typed-ast==1.4.0 # via black, mypy
typing-extensions==3.7.4.1 # via mypy
urllib3==1.25.7 # via requests, sentry-sdk
venusian==3.0.0 # via cornice, pyramid
@ -114,7 +113,6 @@ webencodings==0.5.1 # via bleach, html5lib
webob==1.8.5 # via pyramid, webtest
webtest==2.0.33
wrapt==1.11.2
zipp==0.6.0 # via importlib-metadata
zope.deprecation==4.4.0 # via pyramid, pyramid-jinja2
zope.interface==4.7.1 # via pyramid, pyramid-webassets, transaction, zope.sqlalchemy
zope.sqlalchemy==1.2

2
tildes/tildes/models/user/user.py

@ -291,7 +291,7 @@ class User(DatabaseModel):
@property
def auth_principals(self) -> List[str]:
"""Return the user's authorization principals (used for permissions)."""
principals: List[str] = []
principals = []
# start with any principals manually defined in the permissions column
if not self.permissions:

Loading…
Cancel
Save