Skip to content

Commit

Permalink
Add # pragma: no cover to unreachable places
Browse files Browse the repository at this point in the history
They could be reached by custom integrations like
drf-spectacular
  • Loading branch information
TheSuperiorStanislav committed Jan 10, 2025
1 parent b02d889 commit 04a851a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion import_export_extensions/api/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def get_queryset(self):
"""Return user's jobs."""
if self.action == "start":
# To make it consistent and for better support of drf-spectacular
return super().get_queryset()
return super().get_queryset() # pragma: no cover
return (
super()
.get_queryset()
Expand Down
2 changes: 1 addition & 1 deletion import_export_extensions/api/views/export_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def get_queryset(self):
"""Filter export jobs by resource used in viewset."""
if self.action == "start":
# To make it consistent and for better support of drf-spectacular
return super().get_queryset()
return super().get_queryset() # pragma: no cover
return super().get_queryset().filter(
resource_path=self.resource_class.class_path,
)
Expand Down

0 comments on commit 04a851a

Please sign in to comment.