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

Updated Django to v4.2.20 and other python packages minor upgrades. #4430

Merged
merged 4 commits into from
Mar 7, 2025
Merged
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/uv-pre-commit
rev: "0.5.13"
rev: "0.6.4"
hooks:
- id: uv-export
name: uv-export requirements/prod.txt
Expand Down Expand Up @@ -36,7 +36,7 @@ repos:
]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.4"
rev: "v0.9.9"
hooks:
# Run the linter.
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion hypha/apply/activity/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ class Event(models.Model):

def __str__(self):
if self.source and hasattr(self.source, "title"):
return f"{self.by} {self.get_type_display()} - {self.source.title }"
return f"{self.by} {self.get_type_display()} - {self.source.title}"
else:
return f"{self.by} {self.get_type_display()}"

Expand Down
2 changes: 1 addition & 1 deletion hypha/apply/funds/models/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ def get_absolute_url(self):
params = f"fund={self.pk}"
if self.fund:
params = f"round={self.pk}"
return f'{reverse("apply:submissions:list")}?{params}'
return f"{reverse('apply:submissions:list')}?{params}"

def save(self, *args, **kwargs):
raise NotImplementedError("Do not save through this model")
Expand Down
4 changes: 2 additions & 2 deletions hypha/apply/funds/models/submissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,10 @@ def get_actions_for_user(self, user):
def perform_transition(self, action, user, request=None, **kwargs):
transition = self.get_transition(action)
if not transition:
raise PermissionDenied(f'Invalid "{ action }" transition')
raise PermissionDenied(f'Invalid "{action}" transition')
if not can_proceed(transition):
action = self.phase.transitions[action]
raise PermissionDenied(f'You do not have permission to "{ action }"')
raise PermissionDenied(f'You do not have permission to "{action}"')

transition(by=user, request=request, **kwargs)
self.save(update_fields=["status"])
Expand Down
2 changes: 1 addition & 1 deletion hypha/apply/funds/templatetags/archive_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ def join_with_commas(obj_list: list):
if list_len == 1:
return f"{obj_list[0]}"

return f"{', '.join(str(obj) for obj in obj_list[:list_len-1])} and {obj_list[list_len-1]}"
return f"{', '.join(str(obj) for obj in obj_list[: list_len - 1])} and {obj_list[list_len - 1]}"
2 changes: 1 addition & 1 deletion hypha/apply/funds/views/submission_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def get(self, request, *args, **kwargs):
self.object.stage,
self.object.page,
self.object.round,
f"Lead: { self.object.lead }",
f"Lead: {self.object.lead}",
],
},
],
Expand Down
2 changes: 1 addition & 1 deletion hypha/apply/projects/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def render_reporting(self, record):
else:
display = ""

display += f"{ record.report_config.outstanding_reports() } outstanding"
display += f"{record.report_config.outstanding_reports()} outstanding"
return mark_safe(display)


Expand Down
4 changes: 2 additions & 2 deletions hypha/apply/projects/views/payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def form_valid(self, form):
if form.cleaned_data["message_for_pm"]:
invoice_status_change = _("<p>Invoice added.</p>")

message_for_pm = f'<p>{form.cleaned_data["message_for_pm"]}</p>'
message_for_pm = f"<p>{form.cleaned_data['message_for_pm']}</p>"

message = invoice_status_change + message_for_pm

Expand Down Expand Up @@ -369,7 +369,7 @@ def form_valid(self, form):
invoice_status_change = _(
"<p>Invoice status updated to: {status}.</p>"
).format(status=self.object.get_status_display())
message_for_pm = f'<p>{form.cleaned_data["message_for_pm"]}</p>'
message_for_pm = f"<p>{form.cleaned_data['message_for_pm']}</p>"
message = invoice_status_change + message_for_pm

Activity.objects.create(
Expand Down
2 changes: 1 addition & 1 deletion hypha/apply/projects/views/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ def post(self, *args, **kwargs):
messages.success(self.request, _("Project form has been approved"))

if form.cleaned_data["comment"]:
comment = f"<p>\"{form.cleaned_data['comment']}.\"</p>"
comment = f'<p>"{form.cleaned_data["comment"]}."</p>'

message = paf_status_update_message + comment

Expand Down
2 changes: 1 addition & 1 deletion hypha/apply/users/roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
class Applicant(AbstractUserRole):
role_name = APPLICANT_GROUP_NAME
help_text = _(
"Can access their own application and communicate via " "the communication tab."
"Can access their own application and communicate via the communication tab."
)

available_permissions = {}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "hypha"
description = "A open source submission management platform to receive and manage applications for funding."
readme = "README.md"
version = "5.26.0"
version = "5.27.0"
requires-python = ">=3.10"
license = { text = "BSD-3-Clause" }

Expand Down
Loading
Loading