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

Commit

Permalink
Fixexd pylint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsayre committed Jul 10, 2023
1 parent 397ee76 commit be3bb83
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
"python.formatting.provider": "none",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
Expand All @@ -16,5 +16,8 @@
"when": "$(basename).py"
},
"**/__pycache__": true
},
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
}
}
2 changes: 0 additions & 2 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# unnecessary-pass - readability for functions which only contain pass
disable=
format,
abstract-class-little-used,
abstract-method,
cyclic-import,
duplicate-code,
Expand All @@ -25,7 +24,6 @@ disable=
locally-disabled,
not-an-iterable,
not-context-manager,
redefined-variable-type,
too-few-public-methods,
too-many-arguments,
too-many-branches,
Expand Down
4 changes: 1 addition & 3 deletions pysmartthings/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ def app_type(self) -> str:
def app_type(self, value: str):
"""Set the app type."""
if value not in (APP_TYPE_LAMBDA, APP_TYPE_WEBHOOK):
raise ValueError(
"value must be 'LAMBDA_SMART_APP' " "or 'WEBHOOK_SMART_APP'"
)
raise ValueError("value must be 'LAMBDA_SMART_APP' or 'WEBHOOK_SMART_APP'")
self._app_type = value

@property
Expand Down
2 changes: 1 addition & 1 deletion pysmartthings/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ async def set_color(
if color_hex:
if not COLOR_HEX_MATCHER.match(color_hex):
raise ValueError(
"color_hex was not a properly formatted " "color hex, i.e. #000000."
"color_hex was not a properly formatted color hex, i.e. #000000."
)
color_map["hex"] = color_hex
else:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def test_init():
device = Device()
# Assert
assert device.type == DEVICE_TYPE_UNKNOWN
assert device.capabilities == []
assert device.components == {}
assert not device.capabilities
assert not device.components

@staticmethod
def test_apply_data():
Expand Down Expand Up @@ -1259,7 +1259,7 @@ def test_init():
status = DeviceStatus(None, device_id=DEVICE_ID)
# Assert
assert status.device_id == DEVICE_ID
assert status.attributes == {}
assert not status.attributes
assert not status.switch
assert not status.motion
assert status.level == 0
Expand Down

0 comments on commit be3bb83

Please sign in to comment.