mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-23 03:33:35 +00:00
30c4e6a6a3
* credentials: don't allow none to simplify checks * Implement __bool__ for credentials * Cleanup klaptransport cred usage * Cleanup deviceconfig and tapodevice * fix linting * Pass dummy credentials for tests * Remove __bool__ dunder and add docs to credentials * Check for cred noneness in tapodevice.update()
14 lines
357 B
Python
14 lines
357 B
Python
"""Credentials class for username / passwords."""
|
|
|
|
from dataclasses import dataclass, field
|
|
|
|
|
|
@dataclass
|
|
class Credentials:
|
|
"""Credentials for authentication."""
|
|
|
|
#: Username (email address) of the cloud account
|
|
username: str = field(default="", repr=False)
|
|
#: Password of the cloud account
|
|
password: str = field(default="", repr=False)
|