Fix all E303 pep8 errors.

This commit is contained in:
Feanil Patel
2019-12-30 12:25:38 -05:00
parent 61e1eda20d
commit 6e3fe00fff
783 changed files with 0 additions and 793 deletions

View File

@@ -7,7 +7,6 @@ only running cms tests.
"""
import importlib
import os
import contracts

View File

@@ -3,7 +3,6 @@ Configuration for Studio API Django application
"""
from django.apps import AppConfig

View File

@@ -3,7 +3,6 @@ URLs for the Studio API app
"""
from django.conf.urls import include, url

View File

@@ -1,7 +1,6 @@
"""Tests for course run serializers"""
import datetime
import ddt

View File

@@ -1,7 +1,6 @@
"""Tests for Course run views"""
import datetime
import ddt

View File

@@ -3,7 +3,6 @@ URLs for the Studio API [Course Run]
"""
from rest_framework.routers import DefaultRouter
from .views.course_runs import CourseRunViewSet

View File

@@ -1,7 +1,6 @@
"""HTTP endpoints for the Course Run API."""
from django.conf import settings
from django.http import Http404
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication

View File

@@ -4,7 +4,6 @@ Signal handlers are connected here.
"""
from django.apps import AppConfig

View File

@@ -3,7 +3,6 @@ Celery tasks used by cms_user_tasks
"""
from boto.exception import NoAuthHandlerFound
from celery.exceptions import MaxRetriesExceededError
from celery.task import task

View File

@@ -3,7 +3,6 @@ Unit tests for integration of the django-user-tasks app and its REST API.
"""
import logging
from uuid import uuid4

View File

@@ -3,7 +3,6 @@ Admin site bindings for contentstore
"""
from config_models.admin import ConfigurationModelAdmin
from django.contrib import admin

View File

@@ -5,7 +5,6 @@ Above-modulestore level signal handlers are connected here.
"""
from django.apps import AppConfig

View File

@@ -1,7 +1,6 @@
"""Util methods for Waffle checks"""
from cms.djangoapps.contentstore.config.waffle import ENABLE_CHECKLISTS_QUALITY

View File

@@ -13,7 +13,6 @@ Current db representation:
"""
import logging
import re

View File

@@ -1,7 +1,6 @@
""" Upload file handler to help test progress bars in uploads. """
import time
from django.core.files.uploadhandler import FileUploadHandler

View File

@@ -4,7 +4,6 @@ committing and pushing the changes.
"""
import logging
import os
import subprocess

View File

@@ -4,7 +4,6 @@ erroneous certificate names.
"""
from collections import namedtuple
from django.core.management.base import BaseCommand

View File

@@ -1,7 +1,6 @@
"""Script to Empty the trashcan"""
from django.core.management.base import BaseCommand
from opaque_keys.edx.keys import CourseKey

View File

@@ -15,7 +15,6 @@ At present, it differs from Studio exports in several ways:
"""
import os
import re
import shutil

View File

@@ -14,7 +14,6 @@ attribute is set and the FEATURE['ENABLE_EXPORT_GIT'] is set.
"""
import logging
from django.core.management.base import BaseCommand, CommandError

View File

@@ -3,7 +3,6 @@ Command to migrate transcripts to django storage.
"""
import logging
from django.core.management import BaseCommand, CommandError

View File

@@ -1,7 +1,6 @@
"""Management command to restore assets from trash"""
from django.core.management.base import BaseCommand
from xmodule.contentstore.utils import restore_asset_from_trashcan

View File

@@ -1,7 +1,6 @@
"""Tests running the delete_orphan command"""
import ddt
import six
from django.core.management import CommandError, call_command

View File

@@ -3,7 +3,6 @@ Tests for exporting OLX content.
"""
import shutil
import tarfile
import unittest

View File

@@ -3,7 +3,6 @@ Tests for the fix_not_found management command
"""
import six
from django.core.management import CommandError, call_command

View File

@@ -3,7 +3,6 @@ Unittests for exporting to git via management command.
"""
import copy
import os
import shutil

View File

@@ -3,7 +3,6 @@ Unittests for importing a course via management command
"""
import os
import shutil
import tempfile

View File

@@ -3,7 +3,6 @@ Models for contentstore
"""
from config_models.models import ConfigurationModel
from django.db.models.fields import TextField

View File

@@ -3,7 +3,6 @@ Code related to the handling of Proctored Exams in Studio
"""
import logging
import six

View File

@@ -3,7 +3,6 @@ Authorization rules related to content management.
"""
import user_tasks.rules
user_tasks.rules.add_rules()

View File

@@ -1,7 +1,6 @@
""" receivers of course_published and library_updated events in order to trigger indexing task """
import logging
from datetime import datetime
from functools import wraps

View File

@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import copy
import shutil
from datetime import timedelta

View File

@@ -3,7 +3,6 @@ Tests core caching facilities.
"""
from django.test import TestCase
from opaque_keys.edx.locator import AssetLocator, CourseLocator

View File

@@ -1,7 +1,6 @@
"""Tests for CRUD Operations"""
from xmodule import templates
from xmodule.capa_module import ProblemBlock
from xmodule.course_module import CourseDescriptor

View File

@@ -3,7 +3,6 @@ Test the ability to export courses to xml from studio
"""
import copy
import os
import shutil

View File

@@ -3,7 +3,6 @@ Integration tests for importing courses containing pure XBlocks.
"""
from django.conf import settings
from xblock.core import XBlock
from xblock.fields import String

View File

@@ -3,7 +3,6 @@ Tests for the edx_proctoring integration into Studio
"""
from datetime import datetime, timedelta
import ddt

View File

@@ -1,7 +1,6 @@
"""Tests for verifying availability of resources for locking"""
import ddt
import six
from mock import Mock, patch

View File

@@ -4,7 +4,6 @@ Unit tests for video utils.
"""
from datetime import datetime
from unittest import TestCase

View File

@@ -1,7 +1,6 @@
""" Helper methods for determining user access permissions in Studio """
from student import auth
from student.roles import CourseInstructorRole

View File

@@ -1,7 +1,6 @@
# pylint: disable=missing-docstring,unused-argument
import functools
from django.http import HttpResponse, HttpResponseNotFound, HttpResponseServerError

View File

@@ -4,7 +4,6 @@ the giturl attribute is set.
"""
import logging
import six

View File

@@ -3,7 +3,6 @@ Helper methods for Studio views.
"""
from uuid import uuid4
import six

View File

@@ -3,7 +3,6 @@ Unit tests for credit eligibility UI in Studio.
"""
import mock
import six

View File

@@ -3,7 +3,6 @@ Unit tests for helpers.py.
"""
import six
from django.utils import http

View File

@@ -1,7 +1,6 @@
""" Tests for tab functions (just primitive). """
import json
from contentstore.tests.utils import CourseTestCase

View File

@@ -1,7 +1,6 @@
""" Test cases for the textbook index page. """
import json
from unittest import TestCase

View File

@@ -1,7 +1,6 @@
"""Tests for items views."""
import copy
import json
import tempfile

View File

@@ -3,7 +3,6 @@ Unit tests for the unit page.
"""
from contentstore.views.tests.utils import StudioPageTestCase
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.tests.factories import ItemFactory

View File

@@ -3,7 +3,6 @@ Utilities for view tests.
"""
import json
from contentstore.tests.utils import CourseTestCase

View File

@@ -1,7 +1,6 @@
"""Views for users"""
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.exceptions import PermissionDenied

View File

@@ -3,7 +3,6 @@ django admin page for the course creators table
"""
import logging
from smtplib import SMTPException

View File

@@ -3,7 +3,6 @@ Tests course_creators.admin.py.
"""
import mock
from django.contrib.admin.sites import AdminSite
from django.contrib.auth.models import User

View File

@@ -3,7 +3,6 @@ Tests course_creators.views.py.
"""
import mock
from django.contrib.auth.models import User
from django.core.exceptions import PermissionDenied

View File

@@ -3,7 +3,6 @@ Utilities for returning XModule JS (used by requirejs)
"""
from django.conf import settings
from django.contrib.staticfiles.storage import staticfiles_storage

View File

@@ -3,7 +3,6 @@ Django admin dashboard configuration for LMS XBlock infrastructure.
"""
from config_models.admin import ConfigurationModelAdmin, KeyedConfigurationModelAdmin
from django.contrib import admin

View File

@@ -6,7 +6,6 @@ Includes:
"""
import six
from config_models.models import ConfigurationModel
from django.db.models import TextField

View File

@@ -12,7 +12,6 @@ from the same directory.
"""
# Silence noisy logs
import logging
import os

View File

@@ -40,7 +40,6 @@ When refering to XBlocks, we use the entry-point name. For example,
# pylint: disable=unused-import
import imp
import os
import sys

View File

@@ -3,7 +3,6 @@ Specific overrides to the base prod settings to make development easier.
"""
import logging
from os.path import abspath, dirname, join

View File

@@ -19,7 +19,6 @@ invoked each time that changes have been made.
"""
import os
########################## Devstack settings ###################################

View File

@@ -12,7 +12,6 @@ In two separate processes on devstack:
"""
import os
# We intentionally define lots of variables that aren't used, and

View File

@@ -7,7 +7,6 @@ This is the default template for our main set of AWS servers.
# pylint: disable=wildcard-import, unused-wildcard-import, wrong-import-order
import codecs
import os
import yaml

View File

@@ -14,7 +14,6 @@ sessions. Assumes structure:
# pylint: disable=wildcard-import, unused-wildcard-import, wrong-import-order
from .common import *
import os
from uuid import uuid4

View File

@@ -3,7 +3,6 @@ Mixin class that provides authoring capabilities for XBlocks.
"""
import logging
from django.conf import settings

View File

@@ -3,7 +3,6 @@
"""
from xblock.field_data import SplitFieldData
from xblock.fields import Scope

View File

@@ -3,7 +3,6 @@ XBlock runtime implementations for edX Studio
"""
import six
from django.urls import reverse

View File

@@ -4,7 +4,6 @@ Structured Tagging based on XBlockAsides
"""
import six
from django.conf import settings
from web_fragments.fragment import Fragment

View File

@@ -3,7 +3,6 @@ Tests for the Studio Tagging XBlockAside
"""
import json
from datetime import datetime
from six import StringIO

View File

@@ -3,7 +3,6 @@ Module for code that should run during Studio startup (deprecated)
"""
import django
from django.conf import settings

View File

@@ -3,7 +3,6 @@ Tests specific to the CourseRerunState Model and Manager.
"""
from django.test import TestCase
from opaque_keys.edx.locations import CourseLocator
from six import text_type

View File

@@ -3,7 +3,6 @@ Defines the "ReSTful" API for course modes.
"""
import logging
from django.shortcuts import get_object_or_404

View File

@@ -3,7 +3,6 @@ Tests for course_modes views.
"""
import decimal
import unittest
from datetime import datetime, timedelta

View File

@@ -3,7 +3,6 @@ Set up lookup paths for mako templates.
"""
import contextlib
import hashlib
import os

View File

@@ -19,8 +19,6 @@ Methods for creating RequestContext for using with Mako templates.
"""
from crum import get_current_request
from django.template import RequestContext

View File

@@ -13,7 +13,6 @@
# limitations under the License.
import logging
import six

View File

@@ -13,7 +13,6 @@
# limitations under the License.
from django.conf import settings
from django.template import Context, engines
from mako.template import Template as MakoTemplate

View File

@@ -4,7 +4,6 @@ requiring Superuser access for all other Request types on an API endpoint.
"""
from rest_framework.permissions import SAFE_METHODS, BasePermission
from lms.djangoapps.courseware.access import has_access

View File

@@ -5,7 +5,6 @@ Signal handlers are connected here.
"""
from django.apps import AppConfig

View File

@@ -3,7 +3,6 @@ Management command for expiring old entitlements.
"""
import logging
from textwrap import dedent

View File

@@ -1,7 +1,6 @@
"""Test Entitlements models"""
import mock
from django.core.management import call_command
from django.test import TestCase

View File

@@ -1,7 +1,6 @@
"""Entitlement Models"""
import logging
import uuid as uuid_tools
from datetime import timedelta

View File

@@ -3,7 +3,6 @@ Entitlements related signal handlers.
"""
from django.dispatch import receiver
from entitlements.models import CourseEntitlement

View File

@@ -3,7 +3,6 @@ This file contains celery tasks for entitlements-related functionality.
"""
from celery import task
from celery.utils.log import get_task_logger
from django.conf import settings

View File

@@ -1,7 +1,6 @@
"""Test Entitlements models"""
import unittest
from datetime import timedelta
from uuid import uuid4

View File

@@ -3,7 +3,6 @@ Test entitlements tasks
"""
from datetime import datetime, timedelta
import mock

View File

@@ -3,7 +3,6 @@ Test entitlements utilities
"""
from datetime import timedelta
from django.conf import settings

View File

@@ -3,7 +3,6 @@ Utility methods for the entitlement application.
"""
import logging
from django.utils import timezone

View File

@@ -1,7 +1,6 @@
""" Tests for rendering functions in the mako pipeline. """
import ddt
from mock import patch
from six.moves import map

View File

@@ -3,7 +3,6 @@ Tests of pipeline_mako/templates/static_content.html
"""
import unittest
from edxmako.shortcuts import render_to_string

View File

@@ -3,7 +3,6 @@ Django management command to clear the 'staticfiles' Django cache
"""
from django.core.management.base import BaseCommand
from django.core.cache import caches

View File

@@ -3,7 +3,6 @@ Models for static_replace
"""
import six
from six.moves import map

View File

@@ -3,7 +3,6 @@ Store status messages in the database.
"""
import six
from config_models.admin import ConfigurationModelAdmin
from config_models.models import ConfigurationModel

View File

@@ -3,7 +3,6 @@ A tiny app that checks for a status message.
"""
import logging
from .models import GlobalStatusMessage

View File

@@ -9,7 +9,6 @@ the following:
"""
import csv
from django.contrib.auth.models import User

View File

@@ -1,7 +1,6 @@
""" Command line script to change credit course eligibility deadline. """
import logging
from datetime import datetime, timedelta

View File

@@ -1,7 +1,6 @@
""" Command line script to change user enrollments. """
import logging
from django.core.management.base import BaseCommand, CommandError

View File

@@ -3,7 +3,6 @@ Command to delete all rows from the student_historicalcourseenrollment table.
"""
import logging
from openedx.core.djangoapps.util.row_delete import BaseDeletionCommand, delete_rows

View File

@@ -4,7 +4,6 @@ and set their permissions by name.
"""
from django.apps import apps
from django.contrib.auth.models import Group, Permission
from django.contrib.contenttypes.models import ContentType

View File

@@ -4,7 +4,6 @@ Django users, set/unset permission bits, and associate groups by name.
"""
from django.contrib.auth import get_user_model
from django.contrib.auth.hashers import is_password_usable
from django.contrib.auth.models import Group

Some files were not shown because too many files have changed in this diff Show More