mirror of https://github.com/zulip/zulip.git
mypy: Correct default=None parameter typing in actions.py.
This commit is contained in:
parent
3d9c4494f5
commit
a40a0312f1
|
@ -456,7 +456,7 @@ def notify_created_bot(user_profile: UserProfile) -> None:
|
|||
event = created_bot_event(user_profile)
|
||||
send_event(user_profile.realm, event, bot_owner_user_ids(user_profile))
|
||||
|
||||
def create_users(realm: Realm, name_list: Iterable[Tuple[str, str]], bot_type: int=None) -> None:
|
||||
def create_users(realm: Realm, name_list: Iterable[Tuple[str, str]], bot_type: Optional[int]=None) -> None:
|
||||
user_set = set()
|
||||
for full_name, email in name_list:
|
||||
short_name = email_to_username(email)
|
||||
|
@ -5317,7 +5317,7 @@ def notify_realm_custom_profile_fields(realm: Realm, operation: str) -> None:
|
|||
|
||||
def try_add_realm_custom_profile_field(realm: Realm, name: str, field_type: int,
|
||||
hint: str='',
|
||||
field_data: ProfileFieldData=None) -> CustomProfileField:
|
||||
field_data: Optional[ProfileFieldData]=None) -> CustomProfileField:
|
||||
field = CustomProfileField(realm=realm, name=name, field_type=field_type)
|
||||
field.hint = hint
|
||||
if field.field_type == CustomProfileField.CHOICE:
|
||||
|
@ -5342,7 +5342,7 @@ def do_remove_realm_custom_profile_fields(realm: Realm) -> None:
|
|||
|
||||
def try_update_realm_custom_profile_field(realm: Realm, field: CustomProfileField,
|
||||
name: str, hint: str='',
|
||||
field_data: ProfileFieldData=None) -> None:
|
||||
field_data: Optional[ProfileFieldData]=None) -> None:
|
||||
field.name = name
|
||||
field.hint = hint
|
||||
if field.field_type == CustomProfileField.CHOICE:
|
||||
|
|
Loading…
Reference in New Issue