Fix type hints
This commit is contained in:
parent
afec8e59e4
commit
18cc98f11a
@ -132,6 +132,7 @@ extensions = {
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx.ext.napoleon',
|
||||
'sphinx_rtd_theme',
|
||||
'sphinx.ext.graphviz',
|
||||
'sphinx.ext.inheritance_diagram',
|
||||
@ -205,3 +206,5 @@ set_type_checking_flag = True
|
||||
typehints_fully_qualified = True
|
||||
always_document_param_types = True
|
||||
typehints_document_rtype = True
|
||||
|
||||
napoleon_attr_annotations = True
|
||||
|
@ -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:
|
||||
"""
|
||||
Функция устанавливает пользователю роль легкого агента.
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user