Skip to content

Commit 564f78b

Browse files
committed
Simplify
1 parent 1f1aa0c commit 564f78b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

plugwise/helper.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,10 @@
7373
)
7474

7575

76-
def _find(xml_in: etree, locator: str) -> etree | None:
76+
def _find(xml_in: etree, locator: str) -> etree:
7777
"""Helper-function for use of etree.find()."""
7878
if xml_in is not None:
79-
if (found := xml_in.find(locator)) is not None:
80-
return found
81-
82-
return None
79+
return xml_in.find(locator)
8380

8481
raise XMLDataMissingError()
8582

0 commit comments

Comments
 (0)