Skip to content

Commit

Permalink
Fix ruff findings
Browse files Browse the repository at this point in the history
  • Loading branch information
Shutgun committed Apr 24, 2024
1 parent 501749c commit f06d867
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def state(self, state: bool) -> None:
self._last_activity = datetime.now(tz=self._timezone)
self._logger.debug("State of %s set to %s.", self.element_uid, state)

def set(self, state: bool) -> bool: # noqa: A003
def set(self, state: bool) -> bool:
"""
Set the binary switch of the given element_uid to the given state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def value(self, value: float) -> None:
self._last_activity = datetime.now(tz=self._timezone)
self._logger.debug("Value of %s set to %s.", self.element_uid, value)

def set(self, value: float) -> bool: # noqa: A003
def set(self, value: float) -> bool:
"""
Set the multilevel switch of the given element_uid to the given value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def key_pressed(self, key_pressed: int) -> None:
self._last_activity = datetime.now(tz=self._timezone)
self._logger.debug("key_pressed of element_uid %s set to %s.", self.element_uid, key_pressed)

def set(self, key_pressed: int) -> bool: # noqa: A003
def set(self, key_pressed: int) -> bool:
"""
Trigger a button press of a remote control like if the button was physically pressed.
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ profile = "black"
ignore_missing_imports = true

[tool.ruff]
ignore = ["ANN101", "ANN102", "ANN401", "B024", "COM812", "D203", "D205", "D212", "EM", "FBT001", "N818", "TCH", "TRY300", "TRY400"]
line-length = 127
select = ["ALL"]
lint.ignore = ["ANN101", "ANN102", "ANN401", "B024", "COM812", "D203", "D205", "D212", "EM", "FBT001", "N818", "TCH", "TRY300", "TRY400"]
lint.select = ["ALL"]
target-version = "py37"

[tool.ruff.isort]
[tool.ruff.lint.isort]
combine-as-imports = true
forced-separate = ["tests"]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["PLR2004", "PT004", "PT011", "S101", "S105"]

[tool.setuptools]
Expand Down

0 comments on commit f06d867

Please sign in to comment.