Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Fix some pep8 warning/error #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions samsungctl/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _read_config():
try:
config_json = json.load(config_file)
except ValueError as e:
messsage = "Warning: Could not parse the configuration file.\n %s"
message = "Warning: Could not parse the configuration file.\n %s"
logging.warning(message, e)
return config

Expand Down Expand Up @@ -122,7 +122,7 @@ def main():
except exceptions.AccessDenied:
logging.error("Error: Access denied!")
except exceptions.UnknownMethod:
logging.error("Error: Unknown method '{}'".format(config["method"]))
logging.error("Error: Unknown method '%s'", config["method"])
except socket.timeout:
logging.error("Error: Timed out!")
except OSError as e:
Expand Down
2 changes: 1 addition & 1 deletion samsungctl/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from .remote_websocket import RemoteWebsocket


class Remote:
class Remote(object):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be just class Remote:.

def __init__(self, config):
if config["method"] == "legacy":
self.remote = RemoteLegacy(config)
Expand Down
2 changes: 1 addition & 1 deletion samsungctl/remote_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from . import exceptions


class RemoteLegacy():
class RemoteLegacy(object):
"""Object for remote control connection."""

def __init__(self, config):
Expand Down
3 changes: 1 addition & 2 deletions samsungctl/remote_websocket.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import base64
import json
import logging
import socket
import time

from . import exceptions
Expand All @@ -10,7 +9,7 @@
URL_FORMAT = "ws://{}:{}/api/v2/channels/samsung.remote.control?name={}"


class RemoteWebsocket():
class RemoteWebsocket(object):
"""Object for remote control connection."""

def __init__(self, config):
Expand Down