Skip to content

Commit d18fd65

Browse files
committed
Typing fix: use type casting instead of type ignore
1 parent 60a33e5 commit d18fd65

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lms/product/plugin/plugin.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from dataclasses import dataclass
2+
from typing import cast
23

34
from lms.product.plugin.course_copy import CourseCopyPlugin
45
from lms.product.plugin.grouping import GroupingPlugin
@@ -31,9 +32,9 @@ def __get__(self, instance, owner):
3132
setattr(instance, self.plugin_name, plugin) # Overwrite the attr
3233
return plugin
3334

34-
grouping: GroupingPlugin = _LazyPlugin() # type: ignore
35-
course_copy: CourseCopyPlugin = _LazyPlugin() # type:ignore
36-
misc: MiscPlugin = _LazyPlugin() # type:ignore
35+
grouping = cast(GroupingPlugin, _LazyPlugin())
36+
misc = cast(MiscPlugin, _LazyPlugin())
37+
course_copy = cast(CourseCopyPlugin, _LazyPlugin())
3738

3839
def __init__(self, request, plugin_config: PluginConfig):
3940
self._request = request

0 commit comments

Comments
 (0)