From e05be9ab400d7900de54fe95ccf45f7574c31755 Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Tue, 9 Jul 2024 22:29:22 -0400 Subject: [PATCH] pylint: Pin pylint version to avoid error Letting pylint freely upgrade tends to result in surprise errors, so pin the version. There's a warning we'll probably need to disable later, though maybe pylint will get smarter instead. --- setup.py | 2 +- squaresdb/gate/views.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e6e7f82..048bf35 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ 'scripts': ['flup'], # index.fcgi needs flup 'mysql': ['mysqlclient'], 'dev': [ - 'pylint', 'pylint-django', # lint + 'pylint<3.2.0', 'pylint-django', # lint 'mypy', 'django-stubs', # type checking ], 'doc': ['sphinx'], diff --git a/squaresdb/gate/views.py b/squaresdb/gate/views.py index fda5b5a..dbbffed 100644 --- a/squaresdb/gate/views.py +++ b/squaresdb/gate/views.py @@ -401,6 +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 data['attendee'] = attendee.pk if present else 0 return JsonResponse(data=data, status=HTTPStatus.CREATED)