1
0
mirror of https://github.com/esphome/esphome.git synced 2025-06-19 06:45:49 +01:00

Add Captive Portal ()

* WIP: Captive Portal

* Updates

* Updates

* Lint

* Fixes
This commit is contained in:
Otto Winter
2019-06-09 17:03:51 +02:00
committed by GitHub
parent 8db6f3129c
commit 36f47ade70
38 changed files with 846 additions and 326 deletions

@ -30,7 +30,7 @@ EXECUTABLE_BIT = {
files = [s[3].strip() for s in lines]
files.sort()
file_types = ('.h', '.c', '.cpp', '.tcc', '.yaml', '.yml', '.ini', '.txt', '.ico',
file_types = ('.h', '.c', '.cpp', '.tcc', '.yaml', '.yml', '.ini', '.txt', '.ico', '.svg',
'.py', '.html', '.js', '.md', '.sh', '.css', '.proto', '.conf', '.cfg')
cpp_include = ('*.h', '*.c', '*.cpp', '*.tcc')
ignore_types = ('.ico',)
@ -104,7 +104,7 @@ def lint_ino(fname):
@lint_file_check(exclude=['*{}'.format(f) for f in file_types] + [
'.clang-*', '.dockerignore', '.editorconfig', '*.gitignore', 'LICENSE', 'pylintrc',
'MANIFEST.in', 'docker/Dockerfile*', 'docker/rootfs/*', 'script/*'
'MANIFEST.in', 'docker/Dockerfile*', 'docker/rootfs/*', 'script/*',
])
def lint_ext_check(fname):
return "This file extension is not a registered file type. If this is an error, please " \
@ -135,7 +135,7 @@ def lint_newline(fname):
return "File contains windows newline. Please set your editor to unix newline mode."
@lint_content_check()
@lint_content_check(exclude=['*.svg'])
def lint_end_newline(fname, content):
if content and not content.endswith('\n'):
return "File does not end with a newline, please add an empty line at the end of the file."
@ -164,7 +164,8 @@ def relative_py_search_text(fname, content):
return 'esphome.components.{}'.format(integration)
@lint_content_find_check(relative_py_search_text, include=['esphome/components/*.py'])
@lint_content_find_check(relative_py_search_text, include=['esphome/components/*.py'],
exclude=['esphome/components/web_server/__init__.py'])
def lint_relative_py_import(fname):
return ("Component contains absolute import - Components must always use "
"relative imports within the integration.\n"