Skip to content

Commit

Permalink
fix: Fix pycodestyle and pylint failures
Browse files Browse the repository at this point in the history
Correct assorted spacing issues and unused imports.
  • Loading branch information
jmbowman committed Oct 24, 2023
1 parent a7b3c28 commit 41fd211
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions flashcards/apps/core/tests/test_context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django.test import TestCase, override_settings

from flashcards.apps.core.context_processors import core
# from flashcards.apps.core.context_processors import core

PLATFORM_NAME = 'Test Platform'

Expand All @@ -12,6 +12,6 @@ class CoreContextProcessorTests(TestCase):

@override_settings(PLATFORM_NAME=PLATFORM_NAME)
def test_core(self):
return
return
# request = RequestFactory().get('/')
# self.assertDictEqual(core(request), {'platform_name': PLATFORM_NAME})
3 changes: 2 additions & 1 deletion flashcards/apps/core/tests/test_models.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
""" Tests for core models. """

from django.test import TestCase

# from django_dynamic_fixture import G
# from social_django.models import UserSocialAuth

from flashcards.apps.core.models import User
# from flashcards.apps.core.models import User


class UserTests(TestCase):
Expand Down
1 change: 1 addition & 0 deletions flashcards/apps/core/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from django.contrib.auth import get_user_model
# from django.db import DatabaseError
from django.test import TestCase

# from django.test.utils import override_settings
# from django.urls import reverse

Expand Down
11 changes: 7 additions & 4 deletions flashcards/utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
"""
Integration with openai to generate 'flashcards' in csv form
OpenAI integration utilities.
Integration with OpenAI to generate 'flashcards' in csv form
based on course content
"""

import openai
from flashcards.settings.private import OPENAI_API_KEY # pylint: disable=import-error,no-name-in-module

from flashcards.settings.private import OPENAI_API_KEY # pylint: disable=import-error,no-name-in-module

Check warning on line 10 in flashcards/utils.py

View check run for this annotation

Codecov / codecov/patch

flashcards/utils.py#L10

Added line #L10 was not covered by tests

openai.api_key = OPENAI_API_KEY

Expand All @@ -25,7 +28,7 @@
Lesson 5: Filamentous Fungi
Lesson 6: Aged Meat and Cheese
Lesson 7: Chocolate and Coffee
"""
""" # noqa

course_content = """
ROBERTO KOLTER: While humans have been preparing and consuming
Expand Down Expand Up @@ -169,7 +172,7 @@
Why can the Dead Sea keep swimmers afloat?,Due to high salt content
Why is the Dead Sea called Dead?,Because only simple organisms can live in it
Why only simple organisms can live in the Dead Sea?,Because of high salt content
"""
""" # noqa

messages = [
{"role": "system",
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ edx-drf-extensions==8.12.0
# via -r requirements/validation.txt
edx-i18n-tools==1.3.0
# via -r requirements/dev.in
edx-lint==5.3.4
edx-lint==5.3.6
# via -r requirements/validation.txt
edx-opaque-keys==2.5.1
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ edx-django-utils==5.7.0
# edx-rest-api-client
edx-drf-extensions==8.12.0
# via -r requirements/test.txt
edx-lint==5.3.4
edx-lint==5.3.6
# via -r requirements/test.txt
edx-opaque-keys==2.5.1
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ edx-django-utils==5.7.0
# edx-rest-api-client
edx-drf-extensions==8.12.0
# via -r requirements/test.txt
edx-lint==5.3.4
edx-lint==5.3.6
# via
# -r requirements/quality.in
# -r requirements/test.txt
Expand Down
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ edx-django-utils==5.7.0
# edx-rest-api-client
edx-drf-extensions==8.12.0
# via -r requirements/base.txt
edx-lint==5.3.4
edx-lint==5.3.6
# via -r requirements/test.in
edx-opaque-keys==2.5.1
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements/validation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ edx-drf-extensions==8.12.0
# via
# -r requirements/quality.txt
# -r requirements/test.txt
edx-lint==5.3.4
edx-lint==5.3.6
# via
# -r requirements/quality.txt
# -r requirements/test.txt
Expand Down

0 comments on commit 41fd211

Please sign in to comment.