Skip to content

Commit

Permalink
Move nocover to function scope
Browse files Browse the repository at this point in the history
  • Loading branch information
brylie committed Jul 16, 2023
1 parent 084881b commit a2608f9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions magazine/panels.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ class NestedInlinePanel(InlinePanel):
Issue: https://github.com/wagtail/wagtail/issues/5126
"""

def widget_overrides(self) -> dict:
widgets = {} # pragma: no cover
child_edit_handler = self.get_child_edit_handler() # pragma: no cover
for handler_class in child_edit_handler.children: # pragma: no cover
widgets.update(handler_class.widget_overrides()) # pragma: no cover
widget_overrides = {self.relation_name: widgets} # pragma: no cover
return widget_overrides # pragma: no cover
def widget_overrides(self) -> dict: # pragma: no cover
widgets = {}
child_edit_handler = self.get_child_edit_handler() # type: ignore
for handler_class in child_edit_handler.children:
widgets.update(handler_class.widget_overrides())
widget_overrides = {self.relation_name: widgets}
return widget_overrides

0 comments on commit a2608f9

Please sign in to comment.