Skip to content

Commit 88e2f82

Browse files
chore: mypy/pylint fixes
1 parent 89965a4 commit 88e2f82

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/openedx_catalog/api_impl.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +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
11-
from organizations.api import exceptions as org_exceptions
9+
from organizations.api import ensure_organization, exceptions as org_exceptions # type: ignore[import]
1210

1311
from .models import CatalogCourse, CourseRun
1412

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

0 commit comments

Comments
 (0)