Skip to content

Commit e6317fc

Browse files
committed
refix pylint
1 parent f7f741f commit e6317fc

6 files changed

Lines changed: 6 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ duplicate-code, attribute-defined-outside-init, missing-module-docstring, missin
122122
no-member, invalid-name, import-outside-toplevel, unused-argument, too-many-ancestors, missing-function-docstring,
123123
too-few-public-methods, too-many-arguments, cyclic-import, inconsistent-return-statements,
124124
useless-object-inheritance, logging-fstring-interpolation, consider-using-f-string, too-many-positional-arguments,
125-
unsupported-membership-test
125+
unsupported-membership-test, unused-import
126126
"""
127127

128128
[tool.pylint.format]

src/ephios/core/signup/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def _get_shift_participant_locked_validator(self):
5757
# - there being multiple participation objects for the same participant/shift combination
5858
# Therefore we select user and shift for update, making transactions block.
5959
# To avoid Deadlocks, the lock order must always be user, then shift.
60+
# pylint: disable=protected-access
6061
if isinstance(self.participant, LocalUserParticipant):
6162
UserProfile._base_manager.select_for_update(of=OF_SELF).get(pk=self.participant.user.pk)
6263
return (

src/ephios/core/views/notifications.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ def _configure_choices(self):
107107
self.event_requested = set()
108108
self.event_nonfeedback = set(choices.keys())
109109
if self.event:
110+
# pylint: disable=not-an-iterable, assignment-from-no-return
110111
event_participations = AbstractParticipation.objects.filter(
111112
shift__event=self.event,
112113
)

src/ephios/core/views/workinghour.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class WorkingHourOverview(CustomPermissionRequiredMixin, TemplateView):
4545
permission_required = "core.view_userprofile"
4646

4747
def _get_working_hours_stats(self, start: date, end: date, eventtype: Optional[EventType]):
48+
# pylint: disable=assignment-from-no-return
4849
participations = LocalParticipation.objects.filter(
4950
state=LocalParticipation.States.CONFIRMED,
5051
start_time__date__gte=start,

src/ephios/plugins/eventautoqualification/consequences.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def create_qualification_consequence(sender, participation, **kwargs):
2929
)
3030
elif mode == EventAutoQualificationConfiguration.Modes.EVERY_SHIFT:
3131
# count participant hashes in finished participations (and this one)
32+
# pylint: disable=not-an-iterable
3233
participant_hash_counter = Counter(
3334
hash(participation.participant)
3435
for participation in AbstractParticipation.objects.filter(

src/ephios/plugins/guests/migrations/0007_alter_guestuser_unique_together.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def deduplicate_guest_participations(apps, schema_editor):
1212
for duplicate_guest in (
1313
GuestUser.objects.values("email", "event_id").annotate(Count("id")).filter(id__count__gt=1)
1414
):
15+
# pylint: disable=not-an-iterable
1516
for participation in GuestParticipation.objects.filter(
1617
guest_user__email=duplicate_guest["email"],
1718
guest_user__event_id=duplicate_guest["event_id"],

0 commit comments

Comments
 (0)