Skip to content

Commit

Permalink
fix: solve pylint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanttV committed Dec 9, 2024
1 parent 8a4d8bc commit 1aef6f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions nau_openedx_extensions/filters/definition.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
"""Filters definition module."""

from django.db.models.query import QuerySet
from openedx_filters.exceptions import OpenEdxFilterException
from openedx_filters.tooling import OpenEdxPublicFilter

from django.db.models.query import QuerySet


class ScheduleQuerySetRequested(OpenEdxPublicFilter):
"""
Expand Down
8 changes: 4 additions & 4 deletions nau_openedx_extensions/filters/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class FilterUsersWithAllowedNewsletter(PipelineStep):
```
"""

def run_filter(self, schedules: QuerySet) -> dict:
def run_filter(self, schedules: QuerySet) -> dict: # pylint: disable=arguments-differ
"""
Execute filter that filters users with allowed newsletter.
Expand All @@ -122,9 +122,9 @@ def run_filter(self, schedules: QuerySet) -> dict:
return {
"schedules": filtered_schedules,
}
except FieldError:
raise ScheduleQuerySetRequested.PreventScheduleQuerysetRequest(
except FieldError as exc:
raise ScheduleQuerySetRequested.PreventScheduleQuerySetRequest(
"The filter can't be applied because the user model "
"doesn't have the attribute 'nauuserextendedmodel'.",
schedules,
)
) from exc

0 comments on commit 1aef6f0

Please sign in to comment.