Module: check_mk
Branch: master
Commit: 39a62083bd593a078cbfe7d2e85b778ad1d4a556
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=39a62083bd593a…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Sep 20 08:44:15 2018 +0200
Fixed mypy annotations.
The typing of RuleMatcher._check_match_outcome is still not correct, because
it is highly unclear what it should be: The whole typing of the matchers is
a complete chaos...
Change-Id: I59e9a54c09ef60733aacb2b20680e1e52b3b3514
---
cmk/ec/main.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/cmk/ec/main.py b/cmk/ec/main.py
index 8ce0ba0..464152f 100644
--- a/cmk/ec/main.py
+++ b/cmk/ec/main.py
@@ -46,6 +46,7 @@ import sys
import threading
import time
import traceback
+from typing import Any, Dict, List, Optional, Tuple # pylint: disable=unused-import
import cmk
import cmk.daemon
@@ -2255,7 +2256,7 @@ class RuleMatcher(object):
def _check_match_outcome(self, rule, match_groups, match_priority):
- # type: (dict, dict, dict) -> (bool, dict)
+ # type: (Dict[str, Any], Dict[str, Any], Dict[str, Any]) -> Tuple[bool,
Dict[str, Any]]
"""Decide or not a event is created, canceled or nothing is
done"""
# Check canceling-event
@@ -2678,8 +2679,8 @@ class QueryCOMMAND(Query):
class StatusTable(object):
- prefix = None
- columns = []
+ prefix = None # type: Optional[str]
+ columns = [] # type: List[Tuple[str, Any]]
# Must return a enumerable type containing fully populated lists (rows) matching the
# columns of the table