8000 Address remaining pylint complaints (#481) · ikalchev/HAP-python@0a97ad9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0a97ad9

Browse files
authored
Address remaining pylint complaints (#481)
* Address remaining pylint complaints * Address remaining pylint complaints
1 parent c419ac7 commit 0a97ad9

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pyhap/accessory_driver.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def start(self):
323323
and os.name != "nt"
324324
):
325325
logger.debug("Setting child watcher")
326-
watcher = asyncio.SafeChildWatcher()
326+
watcher = asyncio.SafeChildWatcher() # pylint: disable=deprecated-class
327327
watcher.attach_loop(self.loop)
328328
asyncio.set_child_watcher(watcher)
329329
else:
@@ -653,7 +653,8 @@ def persist(self):
653653
os.name == "nt"
654654
): # Or `[WinError 5] Access Denied` will be raised on Windows
655655
os.chmod(tmp_filename, 0o644)
656-
os.path.exists(self.persist_file) and os.chmod(self.persist_file, 0o644)
656+
if os.path.exists(self.persist_file):
657+
os.chmod(self.persist_file, 0o644)
657658
os.replace(tmp_filename, self.persist_file)
658659
except Exception: # pylint: disable=broad-except
659660
logger.exception("Failed to persist accessory state")

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ deps =
6161
-r{toxinidir}/requirements_all.txt
6262
-r{toxinidir}/requirements_test.txt
6363
commands =
64-
pylint pyhap --disable=missing-docstring,empty-docstring,invalid-name,fixme --max-line-length=120
65-
pylint tests --disable=duplicate-code,missing-docstring,empty-docstring,invalid-name,fixme --max-line-length=120
64+
pylint pyhap --disable=missing-docstring,empty-docstring,invalid-name,fixme,too-many-positional-arguments --max-line-length=120
65+
pylint tests --disable=duplicate-code,missing-docstring,empty-docstring,invalid-name,fixme,too-many-positional-arguments --max-line-length=120
6666

6767

6868
[testenv:bandit]

0 commit comments

Comments
 (0)
0