Skip to content

Commit 5bd2d5a

Browse files
qasimgulzarqasimgulzar
authored andcommitted
fix: quality issues
1 parent 5b3c21c commit 5bd2d5a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • openedx/core/djangoapps/common_initialization

openedx/core/djangoapps/common_initialization/apps.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Common initialization app for the LMS and CMS
33
"""
44

5-
65
from django.apps import AppConfig
76
from django.db import connection
87

@@ -31,14 +30,15 @@ def _add_mimetypes():
3130

3231
@staticmethod
3332
def _add_required_adapters():
33+
"""
34+
Register CourseLocator in psycopg2 extensions
35+
:return:
36+
"""
3437
if 'postgresql' in connection.vendor.lower():
3538
from opaque_keys.edx.locator import CourseLocator
36-
from psycopg2.extensions import register_adapter, QuotedString
37-
38-
39+
from psycopg2.extensions import QuotedString, register_adapter
3940
def adapt_course_locator(course_locator):
40-
return QuotedString(course_locator._to_string())
41-
41+
return QuotedString(course_locator._to_string()) # lint-amnesty, pylint: disable=protected-access
4242

4343
# Register the adapter
4444
register_adapter(CourseLocator, adapt_course_locator)

0 commit comments

Comments
 (0)