requirements: Upgrade mypy from 0.761 to 0.770.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2020-04-17 18:55:04 -07:00
committed by Tim Abbott
parent 8e93175822
commit d3c55c166e
8 changed files with 42 additions and 40 deletions

View File

@@ -143,11 +143,12 @@ def find_log_caller_module(record: logging.LogRecord) -> Optional[str]:
# we find something in the same source file, and that should give the
# right module name.
f = logging.currentframe()
while f is not None:
while True:
if f.f_code.co_filename == record.pathname:
return f.f_globals.get('__name__')
if f.f_back is None:
return None
f = f.f_back
return None # type: ignore # required because of previous ignore on f
logger_nicknames = {
'root': '', # This one is more like undoing a nickname.