Skip to content

Commit

Permalink
Address remaining pylint complaints (#481)
Browse files Browse the repository at this point in the history
* Address remaining pylint complaints

* Address remaining pylint complaints
  • Loading branch information
bdraco authored Nov 3, 2024
1 parent c419ac7 commit 0a97ad9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions pyhap/accessory_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def start(self):
and os.name != "nt"
):
logger.debug("Setting child watcher")
watcher = asyncio.SafeChildWatcher()
watcher = asyncio.SafeChildWatcher() # pylint: disable=deprecated-class
watcher.attach_loop(self.loop)
asyncio.set_child_watcher(watcher)
else:
Expand Down Expand Up @@ -653,7 +653,8 @@ def persist(self):
os.name == "nt"
): # Or `[WinError 5] Access Denied` will be raised on Windows
os.chmod(tmp_filename, 0o644)
os.path.exists(self.persist_file) and os.chmod(self.persist_file, 0o644)
if os.path.exists(self.persist_file):
os.chmod(self.persist_file, 0o644)
os.replace(tmp_filename, self.persist_file)
except Exception: # pylint: disable=broad-except
logger.exception("Failed to persist accessory state")
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ deps =
-r{toxinidir}/requirements_all.txt
-r{toxinidir}/requirements_test.txt
commands =
pylint pyhap --disable=missing-docstring,empty-docstring,invalid-name,fixme --max-line-length=120
pylint tests --disable=duplicate-code,missing-docstring,empty-docstring,invalid-name,fixme --max-line-length=120
pylint pyhap --disable=missing-docstring,empty-docstring,invalid-name,fixme,too-many-positional-arguments --max-line-length=120
pylint tests --disable=duplicate-code,missing-docstring,empty-docstring,invalid-name,fixme,too-many-positional-arguments --max-line-length=120


[testenv:bandit]
Expand Down

0 comments on commit 0a97ad9

Please sign in to comment.