Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update requirements #501

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
- uses: psf/black@24.1.1
with:
src: "./project/thscoreboard"
16 changes: 12 additions & 4 deletions project/thscoreboard/replays/game_ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ class NameLength(enum.Enum):
GameIDs.TH01: (
pgettext_lazy("short game name", "th01"),
pgettext_lazy("standard game name", "The Highly Responsive to Prayers"),
pgettext_lazy("full game name", "東方靈異伝 - The Highly Responsive to Prayers"),
pgettext_lazy(
"full game name", "東方靈異伝 - The Highly Responsive to Prayers"
),
),
GameIDs.TH02: (
pgettext_lazy("short game name", "th02"),
Expand All @@ -76,7 +78,9 @@ class NameLength(enum.Enum):
GameIDs.TH03: (
pgettext_lazy("short game name", "th03"),
pgettext_lazy("standard game name", "The Phantasmagoria of Dim. Dream"),
pgettext_lazy("full game name", "東方夢時空 - The Phantasmagoria of Dim. Dream"),
pgettext_lazy(
"full game name", "東方夢時空 - The Phantasmagoria of Dim. Dream"
),
),
GameIDs.TH04: (
pgettext_lazy("short game name", "th04"),
Expand Down Expand Up @@ -106,7 +110,9 @@ class NameLength(enum.Enum):
GameIDs.TH09: (
pgettext_lazy("short game name", "th09"),
pgettext_lazy("standard game name", "Phantasmagoria of Flower View"),
pgettext_lazy("full game name", "東方花映塚 - Phantasmagoria of Flower View"),
pgettext_lazy(
"full game name", "東方花映塚 - Phantasmagoria of Flower View"
),
),
GameIDs.TH10: (
pgettext_lazy("short game name", "th10"),
Expand Down Expand Up @@ -151,7 +157,9 @@ class NameLength(enum.Enum):
GameIDs.TH17: (
pgettext_lazy("short game name", "th17"),
pgettext_lazy("standard game name", "Wily Beast and Weakest Creature"),
pgettext_lazy("full game name", "東方鬼形獣 - Wily Beast and Weakest Creature"),
pgettext_lazy(
"full game name", "東方鬼形獣 - Wily Beast and Weakest Creature"
),
),
GameIDs.TH18: (
pgettext_lazy("short game name", "th18"),
Expand Down
1 change: 0 additions & 1 deletion project/thscoreboard/replays/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Contains all of the models for the replay site."""


import dataclasses
import datetime
from typing import Optional
Expand Down
6 changes: 3 additions & 3 deletions project/thscoreboard/replays/test_rank_replays.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ def _create_n_replays(self, n: int, is_tas: bool = False) -> None:
user=self.user,
score=1_000_000_000 - 100_000_000 * i,
difficulty=0,
category=models.Category.TAS
if is_tas
else models.Category.STANDARD,
category=(
models.Category.TAS if is_tas else models.Category.STANDARD
),
)

def testRanksAgainstAllReplays(self):
Expand Down
1 change: 0 additions & 1 deletion project/thscoreboard/replays/views/edit_replay.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Views related to editing an existing replay."""


from django import urls
from django import shortcuts
from django.template import response as template_response
Expand Down
1 change: 0 additions & 1 deletion project/thscoreboard/replays/views/user.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""The public page for a user's information."""


from django.contrib import auth
from django.shortcuts import get_object_or_404, render
from django.views.decorators import http as http_decorators
Expand Down
18 changes: 9 additions & 9 deletions project/thscoreboard/users/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,22 +164,22 @@ def clean(self):
username=silentselene_username
).exists()
if not silentselene_is_valid:
errors[
"silentselene_username"
] = f"Silentselene user {silentselene_username} does not exist."
errors["silentselene_username"] = (
f"Silentselene user {silentselene_username} does not exist."
)

royalflare_username = cleaned_data["royalflare_username"]
royalflare_replays = Replay.objects.filter(
imported_username__iexact=royalflare_username
)
if not royalflare_replays.exists():
errors[
"royalflare_username"
] = f"No Royalflare replays found for username {royalflare_username}."
errors["royalflare_username"] = (
f"No Royalflare replays found for username {royalflare_username}."
)
elif not royalflare_replays.filter(user__isnull=True).exists():
errors[
"royalflare_username"
] = f"All replays for {royalflare_username} have already been assigned."
errors["royalflare_username"] = (
f"All replays for {royalflare_username} have already been assigned."
)

if len(errors) > 0:
raise forms.ValidationError(errors)
Expand Down
1 change: 1 addition & 0 deletions project/thscoreboard/users/other_views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Defines views for user and account management."""

# TODO: Separate views in different files and put in views/.

from django.http import HttpResponseBadRequest
Expand Down
8 changes: 4 additions & 4 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r requirements.txt

django-rosetta==0.9.9
flake8==6.1.0
python-dotenv==1.0.0
black==23.7.0
django-rosetta==0.10.0
flake8==7.0.0
python-dotenv==1.0.1
black==24.1.1
14 changes: 7 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
bcrypt==4.0.1
django==4.2.4
bcrypt==4.1.2
django==5.0.1
django-compressor==4.4
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm scared of updating all this stuff in one PR, it seems like it could break something. Could we split it into at least 3? (requirements-dev.txt, requirements.txt [everything except django], and django)

django-sass-processor==1.2.2
freezegun==1.2.2
immutabledict==3.0.0
django-sass-processor==1.4
freezegun==1.4.0
immutabledict==4.1.0
kaitaistruct==0.10
libsass==0.22.0
libsass==0.23.0
postgres==4.0
requests==2.31.0
tsadecode==0.6
whitenoise==6.5.0
whitenoise==6.6.0
Loading