Better format enforcing (#1391)
* Add shared python format-check target * Add .format-check to api lint target * Format api code with makefile format target * Add .format-check to tools lint target * Add .format-check to analyzer lint target * Format analyzer code with makefile format target * Add .format-check to celery lint target * Add .format-check to api_client lint target * Format api_client code with makefile format target * Add .format-check to playout lint target * Run CI linting in parallel * Disable isort in pre-commit
This commit is contained in:
parent
ada4c72e87
commit
30b3470a06
25 changed files with 50 additions and 22 deletions
|
@ -7,5 +7,5 @@ PYLINT_ARG := libretimeapi
|
|||
MYPY_ARG := libretimeapi
|
||||
|
||||
format: .format
|
||||
lint: .pylint .mypy
|
||||
lint: .format-check .pylint .mypy
|
||||
clean: .clean
|
||||
|
|
|
@ -4,6 +4,7 @@ from django.contrib import auth
|
|||
from django.contrib.auth.models import AbstractBaseUser, Permission
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.db import models
|
||||
|
||||
from libretimeapi.managers import UserManager
|
||||
from libretimeapi.permission_constants import GROUPS
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from datetime import datetime, timedelta
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from libretimeapi.models import Schedule, ShowInstance
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
from django.apps import apps
|
||||
from django.contrib.auth.models import Group
|
||||
from rest_framework.test import APITestCase
|
||||
|
||||
from libretimeapi.models import User
|
||||
from libretimeapi.models.user_constants import DJ, GUEST
|
||||
from libretimeapi.permission_constants import GROUPS
|
||||
from rest_framework.test import APITestCase
|
||||
|
||||
|
||||
class TestUserManager(APITestCase):
|
||||
|
|
|
@ -3,6 +3,9 @@ import os
|
|||
from django.conf import settings
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
from model_bakery import baker
|
||||
from rest_framework.test import APIRequestFactory, APITestCase
|
||||
|
||||
from libretimeapi.models.user_constants import ADMIN, DJ, GUEST, PROGRAM_MANAGER
|
||||
from libretimeapi.permission_constants import (
|
||||
DJ_PERMISSIONS,
|
||||
|
@ -10,8 +13,6 @@ from libretimeapi.permission_constants import (
|
|||
PROGRAM_MANAGER_PERMISSIONS,
|
||||
)
|
||||
from libretimeapi.permissions import IsSystemTokenOrUser
|
||||
from model_bakery import baker
|
||||
from rest_framework.test import APIRequestFactory, APITestCase
|
||||
|
||||
|
||||
class TestIsSystemTokenOrUser(APITestCase):
|
||||
|
|
|
@ -4,10 +4,11 @@ from datetime import datetime, timedelta, timezone
|
|||
from django.conf import settings
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
from django.utils import dateparse
|
||||
from libretimeapi.views import FileViewSet
|
||||
from model_bakery import baker
|
||||
from rest_framework.test import APIRequestFactory, APITestCase
|
||||
|
||||
from libretimeapi.views import FileViewSet
|
||||
|
||||
|
||||
class TestFileViewSet(APITestCase):
|
||||
@classmethod
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue