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

@@ -129,7 +129,7 @@ class AdminNotifyHandler(logging.Handler):
report['log_lineno'] = record.lineno
if hasattr(record, "request"):
add_request_metadata(report, record.request) # type: ignore # record.request is added dynamically
add_request_metadata(report, record.request) # type: ignore[attr-defined] # record.request is added dynamically
except Exception:
report['message'] = "Exception in preparing exception report!"