diff --git a/esphomeyaml/config_validation.py b/esphomeyaml/config_validation.py index bff82a6738..1716308b03 100644 --- a/esphomeyaml/config_validation.py +++ b/esphomeyaml/config_validation.py @@ -314,7 +314,7 @@ hex_uint32_t = vol.All(hex_int, vol.Range(min=0, max=4294967295)) i2c_address = hex_uint8_t -def invalid(value): +def invalid(_): raise vol.Invalid("This shouldn't happen.") diff --git a/esphomeyaml/yaml_util.py b/esphomeyaml/yaml_util.py index 33f92a12fa..bff1cc2319 100644 --- a/esphomeyaml/yaml_util.py +++ b/esphomeyaml/yaml_util.py @@ -29,7 +29,7 @@ class NodeStrClass(unicode): pass -class SafeLineLoader(yaml.SafeLoader): +class SafeLineLoader(yaml.SafeLoader): # pylint: disable=too-many-ancestors """Loader class that keeps track of line numbers.""" def compose_node(self, parent, index): @@ -104,7 +104,7 @@ def _add_reference(obj, loader, node): return obj -def _env_var_yaml(loader, node): +def _env_var_yaml(_, node): """Load environment variables and embed it into the configuration YAML.""" args = node.value.split() @@ -235,17 +235,17 @@ def represent_odict(dump, tag, mapping, flow_style=None): return node -def unicode_representer(dumper, uni): +def unicode_representer(_, uni): node = yaml.ScalarNode(tag=u'tag:yaml.org,2002:str', value=uni) return node -def hex_int_representer(dumper, data): +def hex_int_representer(_, data): node = yaml.ScalarNode(tag=u'tag:yaml.org,2002:int', value=str(data)) return node -def ipaddress_representer(dumper, data): +def ipaddress_representer(_, data): node = yaml.ScalarNode(tag=u'tag:yaml.org,2002:str', value=str(data)) return node