mypy: Add specific codes to type: ignore annotations.

https://mypy.readthedocs.io/en/stable/error_codes.html

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2020-04-21 19:13:37 -07:00
committed by Tim Abbott
parent 029bfb9fee
commit f8c95cda51
37 changed files with 145 additions and 140 deletions

View File

@@ -28,7 +28,7 @@ def user_sessions(user_profile: UserProfile) -> List[Session]:
if get_session_user(s) == user_profile.id]
def delete_session(session: Session) -> None:
session_engine.SessionStore(session.session_key).delete() # type: ignore # import_module
session_engine.SessionStore(session.session_key).delete() # type: ignore[attr-defined] # import_module
def delete_user_sessions(user_profile: UserProfile) -> None:
for session in Session.objects.all():