Skip to content

Commit 55f1c3f

Browse files
committed
Fix some code-documentation
1 parent f5433f2 commit 55f1c3f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

pyrogram/client.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def __init__(
272272
storage_engine: Storage = None,
273273
no_joined_notifications: bool = False,
274274
client_platform: enums.ClientPlatform = enums.ClientPlatform.OTHER,
275-
_un_docu_gnihts: List = None
275+
_un_docu_gnihts: List = []
276276
):
277277
super().__init__()
278278

@@ -308,7 +308,7 @@ def __init__(
308308
self.max_business_user_connection_cache_size = max_business_user_connection_cache_size
309309
self.no_joined_notifications = no_joined_notifications
310310
self.client_platform = client_platform
311-
self._un_docu_gnihts = []
311+
self._un_docu_gnihts = _un_docu_gnihts
312312

313313
self.executor = ThreadPoolExecutor(self.workers, thread_name_prefix="Handler")
314314

@@ -424,11 +424,14 @@ async def authorize(self) -> User:
424424

425425
sent_code_descriptions = {
426426
enums.SentCodeType.APP: "Telegram app",
427-
enums.SentCodeType.SMS: "SMS",
428427
enums.SentCodeType.CALL: "phone call",
429428
enums.SentCodeType.FLASH_CALL: "phone flash call",
429+
enums.SentCodeType.MISSED_CALL: "",
430+
enums.SentCodeType.SMS: "SMS",
430431
enums.SentCodeType.FRAGMENT_SMS: "Fragment SMS",
431-
enums.SentCodeType.EMAIL_CODE: "email code"
432+
enums.SentCodeType.FIREBASE_SMS: "SMS after Firebase attestation",
433+
enums.SentCodeType.EMAIL_CODE: "email",
434+
enums.SentCodeType.SETUP_EMAIL_REQUIRED: "add and verify email required",
432435
}
433436

434437
print(f"The confirmation code has been sent via {sent_code_descriptions[sent_code.type]}")

pyrogram/enums/sent_code_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class SentCodeType(AutoName):
3333
"The code will be sent via a flash phone call, that will be closed immediately."
3434

3535
MISSED_CALL = raw.types.auth.SentCodeTypeMissedCall
36-
"Missed call."
36+
"The code will be sent via a Missed call. User manually enters last digits of the calling phone number."
3737

3838
SMS = raw.types.auth.SentCodeTypeSms
3939
"The code was sent via SMS."

0 commit comments

Comments
 (0)