Skip to content

Commit

Permalink
Typing fix: use type casting instead of type ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospri committed Mar 18, 2024
1 parent 60a33e5 commit d18fd65
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lms/product/plugin/plugin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from dataclasses import dataclass
from typing import cast

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

grouping: GroupingPlugin = _LazyPlugin() # type: ignore
course_copy: CourseCopyPlugin = _LazyPlugin() # type:ignore
misc: MiscPlugin = _LazyPlugin() # type:ignore
grouping = cast(GroupingPlugin, _LazyPlugin())
misc = cast(MiscPlugin, _LazyPlugin())
course_copy = cast(CourseCopyPlugin, _LazyPlugin())

def __init__(self, request, plugin_config: PluginConfig):
self._request = request
Expand Down

0 comments on commit d18fd65

Please sign in to comment.