From 3372ddc63d40571cde0f580af89058d437da004e Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Wed, 8 May 2019 15:26:44 +0200 Subject: [PATCH] Lint more filetypes --- esphome/components/ledc/output.py | 4 ++-- script/ci-custom.py | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/esphome/components/ledc/output.py b/esphome/components/ledc/output.py index fd75942672..63b32eedf0 100644 --- a/esphome/components/ledc/output.py +++ b/esphome/components/ledc/output.py @@ -10,8 +10,8 @@ ESP_PLATFORMS = [ESP_PLATFORM_ESP32] def validate_frequency_bit_depth(obj): - frequency = obj.get(CONF_FREQUENCY, 1000) - bit_depth = obj.get(CONF_BIT_DEPTH, 12) + frequency = obj[CONF_FREQUENCY] + bit_depth = obj[CONF_BIT_DEPTH] max_freq = APB_CLOCK_FREQ / (2**bit_depth) if frequency > max_freq: raise cv.Invalid('Maximum frequency for bit depth {} is {}Hz'.format(bit_depth, max_freq)) diff --git a/script/ci-custom.py b/script/ci-custom.py index ce69cd9455..7637f9313c 100755 --- a/script/ci-custom.py +++ b/script/ci-custom.py @@ -22,8 +22,18 @@ files = [] for root, _, fs in os.walk('esphome'): for f in fs: _, ext = os.path.splitext(f) - if ext in ('.h', '.c', '.cpp', '.tcc', '.py'): + if ext in ('.h', '.c', '.cpp', '.tcc', '.yaml', '.yml', '.ini', '.txt', + '.py', '.html', '.js', '.md'): files.append(os.path.join(root, f)) +ignore = [ + 'esphome/dashboard/static/materialize.min.js', + 'esphome/dashboard/static/ace.js', + 'esphome/dashboard/static/mode-yaml.js', + 'esphome/dashboard/static/theme-dreamweaver.js', + 'esphome/dashboard/static/jquery.validate.min.js', + 'esphome/dashboard/static/ext-searchbox.js', +] +files = [f for f in files if f not in ignore] files.sort() errors = collections.defaultdict(list)