Skip to content
Permalink
Browse files

Fixed 'Need type comment for FOO' mypy warnings, final part.

This time the types are horribly coarse, even for our standards, but
figuring out all the typing details now would take too much time. This can
be improved incrementally in the future. (famous last words...)

Now we can leave follow_imports at its default (normal), which is much more
helpful.

Change-Id: Ifea30e24a2fbd01736f4fcee967fc76f61a0a77f
  • Loading branch information
svenpanne committed Nov 20, 2019
1 parent 0d25ce6 commit 310eb40d398635667fd0c113bbd53d9e26a3efb2
Showing with 182 additions and 134 deletions.
  1. +30 −29 cmk/gui/plugins/config/base.py
  2. +152 −103 cmk_base/default_config/base.py
  3. +0 −1 mypy-raw.ini
  4. +0 −1 mypy.ini
@@ -37,15 +37,16 @@
# | |
# '----------------------------------------------------------------------'

roles = {} # User supplied roles
# User supplied roles
roles = {} # type: _Dict

# define default values for all settings
debug = False
screenshotmode = False
profile = False
users = []
users = [] # type: _List
admin_users = ["omdadmin", "cmkadmin"]
guest_users = []
guest_users = [] # type: _List
default_user_role = "user"
save_user_access_times = False
user_online_maxage = 30 # seconds
@@ -58,10 +59,10 @@
"cmk.web.automations": 30,
}

multisite_users = {}
multisite_hostgroups = {}
multisite_servicegroups = {}
multisite_contactgroups = {}
multisite_users = {} # type: _Dict
multisite_hostgroups = {} # type: _Dict
multisite_servicegroups = {} # type: _Dict
multisite_contactgroups = {} # type: _Dict

# ____ _ _ _
# / ___|(_) __| | ___| |__ __ _ _ __
@@ -197,7 +198,7 @@
hidden_views = None

# Patterns to group services in table views together
service_view_grouping = []
service_view_grouping = [] # type: _List

# Custom user stylesheet to load (resides in htdocs/)
custom_style_sheet = None
@@ -211,7 +212,7 @@
# Page heading for main frame set
page_heading = "Checkmk %s"

login_screen = {}
login_screen = {} # type: _Dict

# Timeout for rescheduling of host- and servicechecks
reschedule_timeout = 10.0
@@ -223,7 +224,7 @@
default_language = None

# Hide these languages from user selection
hide_languages = []
hide_languages = [] # type: _List

# Default timestamp format to be used in multisite
default_ts_format = 'mixed'
@@ -246,7 +247,7 @@
multisite_draw_ruleicon = True

# Default downtime configuration
adhoc_downtime = {}
adhoc_downtime = {} # type: _Dict

# Display dashboard date
pagetitle_date_format = None
@@ -259,7 +260,7 @@
escape_plugin_output = True

# Virtual host trees for the "Virtual Host Trees" snapin
virtual_host_trees = []
virtual_host_trees = [] # type: _List

# Fall back to PNP4Nagios as graphing GUI even on CEE
force_pnp_graphing = False
@@ -293,7 +294,7 @@
userdb_automatic_sync = "master"

# Holds dicts defining user connector instances and their properties
user_connections = []
user_connections = [] # type: _List

default_user_profile = {
'contactgroups': [],
@@ -303,7 +304,7 @@
lock_on_logon_failures = False
user_idle_timeout = None
single_user_session = None
password_policy = {}
password_policy = {} # type: _Dict

user_localizations = {
u'Agent type': {
@@ -360,10 +361,10 @@
}

# Contains user specified icons and actions for hosts and services
user_icons_and_actions = {}
user_icons_and_actions = {} # type: _Dict

# Defintions of custom attributes to be used for services
custom_service_attributes = {}
custom_service_attributes = {} # type: _Dict

user_downtime_timeranges = [
{
@@ -389,7 +390,7 @@
]

# Override toplevel and sort_index settings of builtin icons
builtin_icon_visibility = {}
builtin_icon_visibility = {} # type: _Dict

# Name of the hostgroup to filter the network topology view by default
topology_default_filter_group = None
@@ -437,13 +438,13 @@
# '----------------------------------------------------------------------'

# Pre 1.6 tag configuration variables
wato_host_tags = []
wato_aux_tags = []
wato_host_tags = [] # type: _List
wato_aux_tags = [] # type: _List
# Tag configuration variable since 1.6
wato_tags = {
"tag_groups": [],
"aux_tags": [],
}
} # type: _Dict[str, _List]

wato_enabled = True
wato_hide_filenames = True
@@ -457,11 +458,11 @@
wato_activation_method = 'restart'
wato_write_nagvis_auth = False
wato_use_git = False
wato_hidden_users = []
wato_user_attrs = []
wato_host_attrs = []
wato_hidden_users = [] # type: _List
wato_user_attrs = [] # type: _List
wato_host_attrs = [] # type: _List
wato_legacy_eval = False
wato_read_only = {}
wato_read_only = {} # type: _Dict
wato_hide_folders_without_read_permissions = False
wato_pprint_config = False
wato_icon_categories = [
@@ -480,15 +481,15 @@
# | |
# '----------------------------------------------------------------------'

aggregation_rules = {}
aggregations = []
host_aggregations = []
bi_packs = {}
aggregation_rules = {} # type: _Dict
aggregations = [] # type: _List
host_aggregations = [] # type: _List
bi_packs = {} # type: _Dict
bi_precompile_on_demand = True
bi_use_legacy_compilation = False

default_bi_layout = {"node_style": "builtin_hierarchy", "line_style": "straight"}
bi_layouts = {"templates": {}, "aggregations": {}}
bi_layouts = {"templates": {}, "aggregations": {}} # type: _Dict[str, _Dict]

# Deprecated. Kept for compatibility.
bi_compile_log = None

0 comments on commit 310eb40

Please sign in to comment.
You can’t perform that action at this time.