Skip to content

Commit bf0fbd6

Browse files
chore: mypy/pylint fixes
1 parent 1c61f30 commit bf0fbd6

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/openedx_catalog/api_impl.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
import logging
66
from typing import overload
77

8-
from django.conf import settings
98
from opaque_keys.edx.keys import CourseKey
10-
from organizations.api import ensure_organization
9+
from organizations.api import ensure_organization # type: ignore[import]
1110
from organizations.api import exceptions as org_exceptions
1211

1312
from .models import CatalogCourse, CourseRun

src/openedx_catalog/models/catalog_course.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,15 @@ def language_short(self) -> str:
136136
return self.language[:2] # Strip locale
137137

138138
@language_short.setter
139-
def language_short(self, legacy_code: str) -> str:
139+
def language_short(self, legacy_code: str) -> None:
140140
"""
141141
Set the language code used by this catalog course, without locale.
142142
This is always a two-digit code, except for Mandarin and Cantonese.
143143
(This should be a value from settings.ALL_LANGUAGES, and should match
144144
the CourseOverview.language field.)
145145
"""
146146
if hasattr(settings, "ALL_LANGUAGES"):
147-
assert legacy_code in [code for (code, _name) in settings.ALL_LANGUAGES]
147+
assert legacy_code in [code for (code, _name) in settings.ALL_LANGUAGES] # type: ignore
148148
if legacy_code == "zh_HANS": # Mandarin / Simplified
149149
self.language = "zh-cn" # Chinese (Mainland China)
150150
elif legacy_code == "zh_HANT": # Cantonese / Traditional

src/openedx_catalog/models_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
See the `openedx_catalog.api` docstring for much more details.
77
"""
88

9+
# pylint: disable=unused-import
910
from .models import CatalogCourse, CourseRun

tests/openedx_catalog/test_api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from openedx_catalog import api
1515
from openedx_catalog.models_api import CatalogCourse, CourseRun
1616

17-
1817
pytestmark = pytest.mark.django_db
1918

2019

0 commit comments

Comments
 (0)