-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sydent.threepid pass mypy --strict #427
Conversation
c2dca4d
to
f5f785e
Compare
Oops, I confused my branches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling this :)
sydent/threepid/bind.py
Outdated
token["signed"] = { | ||
"mxid": mxid, | ||
"token": cast(str, token["token"]), | ||
} | ||
token["signed"] = signedjson.sign.sign_json( | ||
token["signed"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be identical behaviour: you've dropped the "token"
key from the dict that's being signed?
Is there some reason why this is justifiable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I'm not sure what I was thinking here. I'll take another look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Many thanks! |
Part of #414
I was sad to get rid of the
TypedDict
fromsydent.db.invite_tokens
, but given that we immediately use it by adding extra keys, it wasn't worth the effort. Oh well.