Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaned some low hanging pylint warnings. #6

Merged
merged 1 commit into from
Apr 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion esphomeyaml/config_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def publish_topic(value):
i2c_address = hex_uint8_t


def invalid(value):
def invalid(_):
raise vol.Invalid("This shouldn't happen.")


Expand Down
10 changes: 5 additions & 5 deletions esphomeyaml/yaml_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -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

Expand Down