Skip to content

Commit d9353dd

Browse files
committed
Format with pre-commit
1 parent e5cb2cb commit d9353dd

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

adafruit_portalbase/network.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,19 @@ def connect(self, max_attempts=10):
385385
raise TypeError(
386386
"'networks' must be a list/tuple of dicts of 'ssid' and 'password'"
387387
)
388-
389-
self._wifi_credentials = list(filter(
390-
lambda credentials: isinstance(credentials, (list, tuple)) and "ssid" in credentials and "password" in credentials and type(credentials["ssid"]) is str and type(credentials["password"]) is str and len(credentials["ssid"]) and len(credentials["password"]),
391-
self._wifi_credentials
392-
))
388+
389+
self._wifi_credentials = list(
390+
filter(
391+
lambda credentials: isinstance(credentials, (list, tuple))
392+
and "ssid" in credentials
393+
and "password" in credentials
394+
and type(credentials["ssid"]) is str
395+
and type(credentials["password"]) is str
396+
and len(credentials["ssid"])
397+
and len(credentials["password"]),
398+
self._wifi_credentials,
399+
)
400+
)
393401
if not len(self._wifi_credentials):
394402
self._wifi_credentials = None
395403
raise OSError("No valid wifi credentials provided")

0 commit comments

Comments
 (0)