Skip to content

Commit

Permalink
ci: Update Python to 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
kiritofeng committed Dec 17, 2024
1 parent d97a56f commit ff2984b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compilemessages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/makemessages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/updatemessages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions judge/admin/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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,
}
Expand Down

0 comments on commit ff2984b

Please sign in to comment.