Use pylint for some files

This commit is contained in:
Степаненко Ольга
2021-04-28 18:57:36 +03:00
parent 4666570177
commit 2e3e567d2d
8 changed files with 33 additions and 13 deletions

View File

@@ -1,3 +1,8 @@
from django.contrib import admin
"""
Встроенный файл
"""
# from django.contrib import admin
# Register your models here.

View File

@@ -1,5 +1,6 @@
import os
"""
Авторизация по Zenpy.
"""
from zenpy import Zenpy
from zenpy.lib.api_objects import User as ZenpyUser

View File

@@ -1,3 +1,6 @@
"""
Формы.
"""
from django import forms
from django.contrib.auth.forms import AuthenticationForm
from django_registration.forms import RegistrationFormUniqueEmail

View File

@@ -1,3 +1,6 @@
"""
Сериализаторы.
"""
from django.contrib.auth.models import User
from rest_framework import serializers
from main.models import UserProfile
@@ -61,7 +64,12 @@ class ZendeskUserSerializer(serializers.Serializer):
"""
if obj.custom_role_id == ZENDESK_ROLES['engineer']:
return 'engineer'
elif obj.custom_role_id == ZENDESK_ROLES['light_agent']:
if obj.custom_role_id == ZENDESK_ROLES['light_agent']:
return 'light_agent'
else:
return "empty"
return "empty"
def create(self, validated_data):
pass
def update(self, instance, validated_data):
pass

View File

@@ -1,2 +1,5 @@
from django.test import TestCase, Client
import access_controller.settings as sets
"""
Тесты.
"""
# from django.test import TestCase, Client
# import access_controller.settings as sets

View File

@@ -1,3 +1,7 @@
"""
REST framework adds support for automatic URL routing to Django.
"""
from rest_framework.routers import DefaultRouter
from main.views import UsersViewSet