Type hint additions (#26831)

* Type hint additions

* Remove optional from sidebar_icon comment

Co-Authored-By: Franck Nijhof <frenck@frenck.nl>

* Remove optional from sidebar_title comment

Co-Authored-By: Franck Nijhof <frenck@frenck.nl>

* Fix issues after rebase and mypy 0.730
This commit is contained in:
Ville SkyttäandFranck Nijhof authored and GitHub committed 2019-09-29 20:07:49 +03:00
1 parent 4f55235aa2
commit f259ff17d5
27 files changed
+184 -68

No files matched your search

@@ -4,7 +4,7 @@ import logging
import mimetypes
import os
import pathlib
from typing import Optional, Set, Tuple
from typing import Any, Dict, Optional, Set, Tuple
from aiohttp import web, web_urldispatcher, hdrs
import voluptuous as vol
@@ -122,19 +122,19 @@ class Panel:
"""Abstract class for panels."""
# Name of the webcomponent
component_name = None
component_name: Optional[str] = None
# Icon to show in the sidebar (optional)
sidebar_icon = None
# Icon to show in the sidebar
sidebar_icon: Optional[str] = None
# Title to show in the sidebar (optional)
sidebar_title = None
# Title to show in the sidebar
sidebar_title: Optional[str] = None
# Url to show the panel in the frontend
frontend_url_path = None
frontend_url_path: Optional[str] = None
# Config to pass to the webcomponent
config = None
config: Optional[Dict[str, Any]] = None
# If the panel should only be visible to admins
require_admin = False