From ff2984b14c608d0606791479242276d7defecf87 Mon Sep 17 00:00:00 2001 From: kiritofeng Date: Mon, 16 Dec 2024 23:14:07 -0500 Subject: [PATCH] ci: Update Python to 3.8 --- .github/workflows/build.yml | 8 ++++---- .github/workflows/compilemessages.yml | 4 ++-- .github/workflows/makemessages.yml | 4 ++-- .github/workflows/updatemessages.yml | 4 ++-- judge/admin/submission.py | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 56333b47a6..40afce4232 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,10 +5,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Python 3.7 + - name: Set up Python 3.8 uses: actions/setup-python@v5 with: - python-version: '3.7' + python-version: '3.8' - name: Install flake8 run: pip install flake8 flake8-import-order flake8-future-import flake8-commas flake8-logging-format flake8-quotes - name: Lint with flake8 @@ -19,10 +19,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Python 3.7 + - name: Set up Python 3.8 uses: actions/setup-python@v5 with: - python-version: '3.7' + python-version: '3.8' - name: Cache pip uses: actions/cache@v4 with: diff --git a/.github/workflows/compilemessages.yml b/.github/workflows/compilemessages.yml index 106b353fbe..677208cfd9 100644 --- a/.github/workflows/compilemessages.yml +++ b/.github/workflows/compilemessages.yml @@ -11,10 +11,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Python 3.7 + - name: Set up Python 3.8 uses: actions/setup-python@v5 with: - python-version: '3.7' + python-version: '3.8' - name: Checkout submodules run: | git submodule init diff --git a/.github/workflows/makemessages.yml b/.github/workflows/makemessages.yml index c5bd6aef41..f32a608ce1 100644 --- a/.github/workflows/makemessages.yml +++ b/.github/workflows/makemessages.yml @@ -8,10 +8,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Python 3.7 + - name: Set up Python 3.8 uses: actions/setup-python@v5 with: - python-version: '3.7' + python-version: '3.8' - name: Checkout submodules run: | git submodule init diff --git a/.github/workflows/updatemessages.yml b/.github/workflows/updatemessages.yml index 1c56045a8c..9360835ea0 100644 --- a/.github/workflows/updatemessages.yml +++ b/.github/workflows/updatemessages.yml @@ -10,10 +10,10 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up Python 3.7 + - name: Set up Python 3.8 uses: actions/setup-python@v5 with: - python-version: '3.7' + python-version: '3.8' - name: Checkout submodules run: | git submodule init diff --git a/judge/admin/submission.py b/judge/admin/submission.py index 1fb5a27eb4..fc897a7f24 100644 --- a/judge/admin/submission.py +++ b/judge/admin/submission.py @@ -82,7 +82,7 @@ def formfield_for_dbfield(self, db_field, **kwargs): contest__problems=submission.problem) \ .only('id', 'contest__name', 'virtual') - def label(obj): + def label(obj): # noqa: F811 if obj.spectate: return gettext('%s (spectating)') % obj.contest.name if obj.virtual: @@ -92,7 +92,7 @@ def label(obj): kwargs['queryset'] = ContestProblem.objects.filter(problem=submission.problem) \ .only('id', 'problem__name', 'contest__name') - def label(obj): + def label(obj): # noqa: F811 return pgettext('contest problem', '%(problem)s in %(contest)s') % { 'problem': obj.problem.name, 'contest': obj.contest.name, }