mirror of
https://github.com/malmeloo/FindMy.py.git
synced 2026-04-17 21:53:57 +02:00
Refactor entire module
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user