Add pylint, add init-file in access_controller folder to run pylint
This commit is contained in:
parent
68833ccdd5
commit
bd8ba97a46
@ -147,6 +147,8 @@ docker run -d -p 8000:8000 \
|
|||||||
## Параметры тестовой песочницы:
|
## Параметры тестовой песочницы:
|
||||||
Пример полной конфигурации можно найти в [.env.example](.env.example). Почту и токен админа ZenDesk взять у руководителя (если вы не админ).
|
Пример полной конфигурации можно найти в [.env.example](.env.example). Почту и токен админа ZenDesk взять у руководителя (если вы не админ).
|
||||||
|
|
||||||
|
## Для проверки pylint используем:
|
||||||
|
pylint --load-plugins pylint_django ../access_controller
|
||||||
|
|
||||||
## Read more
|
## Read more
|
||||||
- Zenpy: [http://docs.facetoe.com.au](http://docs.facetoe.com.au)
|
- Zenpy: [http://docs.facetoe.com.au](http://docs.facetoe.com.au)
|
||||||
|
0
__init__.py
Normal file
0
__init__.py
Normal file
@ -134,15 +134,12 @@ extensions = {
|
|||||||
'sphinx.ext.autodoc',
|
'sphinx.ext.autodoc',
|
||||||
'sphinx.ext.intersphinx',
|
'sphinx.ext.intersphinx',
|
||||||
'sphinx.ext.viewcode',
|
'sphinx.ext.viewcode',
|
||||||
'sphinx.ext.napoleon',
|
|
||||||
'sphinx_rtd_theme',
|
'sphinx_rtd_theme',
|
||||||
'sphinx.ext.graphviz',
|
'sphinx.ext.graphviz',
|
||||||
'sphinx.ext.inheritance_diagram',
|
'sphinx.ext.inheritance_diagram',
|
||||||
'sphinx_autodoc_typehints',
|
'sphinx_autodoc_typehints',
|
||||||
'sphinxcontrib.spelling',
|
'sphinxcontrib.spelling',
|
||||||
# 'm2r'
|
# 'm2r'
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -193,7 +190,7 @@ autodoc_typehints = "description"
|
|||||||
# spell checking
|
# spell checking
|
||||||
spelling_lang = 'ru_RU'
|
spelling_lang = 'ru_RU'
|
||||||
tokenizer_lang = 'ru_RU'
|
tokenizer_lang = 'ru_RU'
|
||||||
spelling_exclude_patterns=['ignored_*']
|
spelling_exclude_patterns=['ignored_*', '../../main/models.py']
|
||||||
spelling_show_suggestions = True
|
spelling_show_suggestions = True
|
||||||
spelling_show_whole_line=True
|
spelling_show_whole_line=True
|
||||||
spelling_warning=True
|
spelling_warning=True
|
||||||
@ -213,5 +210,5 @@ typehints_fully_qualified = True
|
|||||||
always_document_param_types = True
|
always_document_param_types = True
|
||||||
typehints_document_rtype = True
|
typehints_document_rtype = True
|
||||||
|
|
||||||
napoleon_attr_annotations = True
|
|
||||||
|
|
||||||
|
@ -49,12 +49,13 @@ class RoleChangeLogs(models.Model):
|
|||||||
"""
|
"""
|
||||||
Модель для логирования изменений ролей пользователя.
|
Модель для логирования изменений ролей пользователя.
|
||||||
"""
|
"""
|
||||||
|
user = models.ForeignKey(to=User, on_delete=models.CASCADE,
|
||||||
user = models.ForeignKey(to=User, on_delete=models.CASCADE, help_text='Пользователь, которому присвоили другую роль')
|
help_text='Пользователь, которому присвоили другую роль')
|
||||||
old_role = models.IntegerField(default=0, help_text='Старая роль')
|
old_role = models.IntegerField(default=0, help_text='Старая роль')
|
||||||
new_role = models.IntegerField(default=0, help_text='Присвоенная роль')
|
new_role = models.IntegerField(default=0, help_text='Присвоенная роль')
|
||||||
change_time = models.DateTimeField(default=timezone.now, help_text='Дата и время изменения роли')
|
change_time = models.DateTimeField(default=timezone.now, help_text='Дата и время изменения роли')
|
||||||
changed_by = models.ForeignKey(to=User, on_delete=models.CASCADE, related_name='changed_by', help_text='Кем была изменена роль')
|
changed_by = models.ForeignKey(to=User, on_delete=models.CASCADE, related_name='changed_by',
|
||||||
|
help_text='Кем была изменена роль')
|
||||||
|
|
||||||
|
|
||||||
class UnassignedTicketStatus(models.IntegerChoices):
|
class UnassignedTicketStatus(models.IntegerChoices):
|
||||||
|
@ -15,3 +15,5 @@ sphinx-autodoc-typehints==1.11.1
|
|||||||
pyenchant==3.2.0
|
pyenchant==3.2.0
|
||||||
sphinxcontrib-spelling==7.1.0
|
sphinxcontrib-spelling==7.1.0
|
||||||
m2r == 0.2.1
|
m2r == 0.2.1
|
||||||
|
pylint == 2.8.2
|
||||||
|
pylint-django == 2.4.4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user