Skip to content

Commit

Permalink
Issue #491 - Add logger type annotations for GUI mypy checks
Browse files Browse the repository at this point in the history
Add minor type annotations in log.py to keep type checking happy in
AIT-GUI.

Resolve #491
  • Loading branch information
MJJoyce committed Jan 24, 2023
1 parent b699b04 commit 63720ff
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ait/core/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import socket
import datetime
import time
from typing import Callable, Optional

import logging
import logging.handlers
Expand Down Expand Up @@ -316,10 +317,10 @@ def notice(*args, **kwargs):
# type `Any` addresses mypy issues where log calls are marked as
# "None" being not callable.
logger = None
crit = None
debug = None
error = None
info = None
warn = None
crit: Optional[Callable[[str], str]] = None
debug: Optional[Callable[[str], str]] = None
error: Optional[Callable[[str], str]] = None
info: Optional[Callable[[str], str]] = None
warn: Optional[Callable[[str], str]] = None

init()

0 comments on commit 63720ff

Please sign in to comment.