mypy: Add cast for zephyr_mirror_backend logger variable.

This commit is contained in:
neiljp (Neil Pilgrim) 2018-01-08 06:37:14 -08:00 committed by showell
parent 466f5a7167
commit 02d9ba8edd

View file

@ -21,7 +21,7 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
from __future__ import absolute_import from __future__ import absolute_import
from typing import IO, Any, Dict, List, Text, Union, Set, Tuple, Optional from typing import IO, Any, Dict, List, Text, Union, Set, Tuple, Optional, cast
from types import FrameType from types import FrameType
import sys import sys
@ -48,7 +48,7 @@ class States(object):
Startup, ZulipToZephyr, ZephyrToZulip, ChildSending = list(range(4)) Startup, ZulipToZephyr, ZephyrToZulip, ChildSending = list(range(4))
CURRENT_STATE = States.Startup CURRENT_STATE = States.Startup
logger = None # type: logging.Logger logger = cast(logging.Logger, None) # type: logging.Logger # FIXME cast should not be needed?
def to_zulip_username(zephyr_username): def to_zulip_username(zephyr_username):
# type: (str) -> str # type: (str) -> str