From 979d9f8109895a62389fb58e1aaecb01cd444379 Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Wed, 5 Feb 2025 00:35:02 -0500 Subject: [PATCH] pylint: Newer (floating) pylint and ignore some warnings --- setup.py | 2 +- squaresdb/gate/views.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 9453159..d28f1ae 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ 'scripts': ['flup'], # index.fcgi needs flup 'mysql': ['mysqlclient'], 'dev': [ - 'pylint<3.2.0', 'pylint-django', # lint + 'pylint', 'pylint-django', # lint 'mypy', 'django-stubs', # type checking ], 'doc': ['sphinx'], diff --git a/squaresdb/gate/views.py b/squaresdb/gate/views.py index c265774..f155ed9 100644 --- a/squaresdb/gate/views.py +++ b/squaresdb/gate/views.py @@ -401,7 +401,7 @@ def signin_api(request): return exc.response data['payment'] = payment.pk if paid else 0 - # pylint exception possibly-used-before-assignment needed starting in 3.2.0 + # pylint:disable=possibly-used-before-assignment # pylint>=3.2.0 data['attendee'] = attendee.pk if present else 0 return JsonResponse(data=data, status=HTTPStatus.CREATED) @@ -557,7 +557,7 @@ def _fill_squarespay_sub_amount(total, sub_datas): def _find_squarespay_subs_from_row(new_subs, errors, warns, allow_periods, row, payment_type) -> None: - # pylint:disable=too-many-arguments + # pylint:disable=too-many-arguments,too-many-positional-arguments assert row['paymentOption'] == 'card' if row['decision'] != 'ACCEPT': warn = 'Payment for "%s" had decision %s, ignoring' % (row['name'], row['decision'])