Fix type hints

This commit is contained in:
Andrew Smirnov
2021-04-15 19:55:34 +03:00
parent afec8e59e4
commit 18cc98f11a
3 changed files with 8 additions and 5 deletions

View File

@@ -114,7 +114,7 @@ class ZendeskAdmin:
user = self.admin.users.search(email).values[0]
return user.organization.name if user.organization else None
def create_admin(self) -> Zenpy:
def create_admin(self) -> None:
"""
Функция создает администратора, проверяя наличие вводимых данных в env.
@@ -141,7 +141,7 @@ class ZendeskAdmin:
raise ValueError('invalid access_controller`s login data')
def update_role(user_profile: UserProfile, role: int) -> UserProfile:
def update_role(user_profile: UserProfile, role: int) -> None:
"""
Функция меняет роль пользователя.
@@ -157,7 +157,7 @@ def update_role(user_profile: UserProfile, role: int) -> UserProfile:
zendesk.admin.users.update(user)
def make_engineer(user_profile: UserProfile, who_changes: User) -> UserProfile:
def make_engineer(user_profile: UserProfile, who_changes: User) -> None:
"""
Функция устанавливает пользователю роль инженера.
@@ -167,7 +167,7 @@ def make_engineer(user_profile: UserProfile, who_changes: User) -> UserProfile:
update_role(user_profile, ROLES['engineer'])
def make_light_agent(user_profile: UserProfile, who_changes: User) -> UserProfile:
def make_light_agent(user_profile: UserProfile, who_changes: User) -> None:
"""
Функция устанавливает пользователю роль легкого агента.

View File

@@ -14,7 +14,7 @@ class CustomRegistrationForm(RegistrationFormUniqueEmail):
:type visible_fields.email: :class:`django_registration.forms.RegistrationFormUniqueEmail`
"""
def __init__(self, *args, **kwargs) -> RegistrationFormUniqueEmail:
def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
for visible in self.visible_fields():
if visible.field.widget.attrs.get('class', False):