Refactor entire module

This commit is contained in:
Mike A
2024-01-03 22:13:16 +01:00
parent 1be1246675
commit e31f9ac745
18 changed files with 459 additions and 524 deletions

View File

@@ -2,12 +2,12 @@ import json
import logging
import os
from findmy import (
from findmy.reports import (
AppleAccount,
LoginState,
RemoteAnisetteProvider,
SmsSecondFactor,
keys,
SmsSecondFactorMethod,
)
# URL to (public or local) anisette server
@@ -35,7 +35,7 @@ def login(account: AppleAccount):
# Print the (masked) phone numbers
for method in methods:
if isinstance(method, SmsSecondFactor):
if isinstance(method, SmsSecondFactorMethod):
print(method.phone_number)
# Just take the first one to keep things simple

View File

@@ -3,11 +3,11 @@ import json
import logging
import os
from findmy import (
from findmy.reports import (
AsyncAppleAccount,
LoginState,
RemoteAnisetteProvider,
SmsSecondFactor,
SmsSecondFactorMethod,
keys,
)
@@ -36,7 +36,7 @@ async def login(account: AsyncAppleAccount):
# Print the (masked) phone numbers
for method in methods:
if isinstance(method, SmsSecondFactor):
if isinstance(method, SmsSecondFactorMethod):
print(method.phone_number)
# Just take the first one to keep things simple