Skip to content

Commit 5a64044

Browse files
authored
add documentation for .connect(secrets_dict).
1 parent e69c950 commit 5a64044

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

adafruit_esp32spi/adafruit_esp32spi.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,13 @@ def disconnect(self):
574574
raise OSError("Failed to disconnect")
575575

576576
def connect(self, ssid, password=None, timeout=10):
577-
"""Connect to an access point with given name and password."""
577+
"""Connect to an access point with given name and password.
578+
579+
**Deprecated functionality:** If the first argument (``ssid``) is a ``dict``,
580+
assume it is a dictionary with entries for keys ``"ssid"`` and, optionally, ``"password"``.
581+
This mimics the previous signature for ``connect()``.
582+
This upward compatbility will be removed in a future release.
583+
"""
578584
if isinstance(ssid, dict): # secrets
579585
ssid, password = ssid["ssid"], ssid.get("password")
580586
self.connect_AP(ssid, password, timeout_s=timeout)

0 commit comments

Comments
 (0)