Use pylint for some files
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
from django.contrib import admin
|
||||
"""
|
||||
Встроенный файл
|
||||
"""
|
||||
|
||||
|
||||
# from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
|
||||
"""
|
||||
Авторизация по Zenpy.
|
||||
"""
|
||||
from zenpy import Zenpy
|
||||
from zenpy.lib.api_objects import User as ZenpyUser
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
"""
|
||||
Формы.
|
||||
"""
|
||||
from django import forms
|
||||
from django.contrib.auth.forms import AuthenticationForm
|
||||
from django_registration.forms import RegistrationFormUniqueEmail
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user