Skip to content

Commit df6d2cc

Browse files
committed
Add remaining missing type error ignore comments
1 parent e7fef1c commit df6d2cc

9 files changed

Lines changed: 9 additions & 9 deletions

File tree

twisted/mysite/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
TEMPLATES = [
111111
{
112112
"BACKEND": "django.template.backends.django.DjangoTemplates",
113-
"DIRS": [],
113+
"DIRS": [], # pyrefly: ignore[implicit-any-empty-container]
114114
"APP_DIRS": True,
115115
"OPTIONS": {
116116
"context_processors": [

twisted/twisted_site/ari.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def get_project_status(project: Project) -> dict[str, Any]: # pyrefly: ignore[e
164164
}
165165

166166

167-
def ship_passes_from_status(status: dict[str, Any] | None) -> tuple[str, str]:
167+
def ship_passes_from_status(status: dict[str, Any] | None) -> tuple[str, str]: # pyrefly: ignore[explicit-any]
168168
"""Maps an ARI /status response into (first_pass_status, second_pass_status),
169169
using the PROJECT_SHIP_STATUSES vocabulary (pending/approved/rejected/requested_changes)."""
170170
if status is None or len(status) == 0:

twisted/twisted_site/slack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
def send_blocks(
1414
*,
1515
channel: str,
16-
blocks: list[dict[str, Any]],
16+
blocks: list[dict[str, Any]], # pyrefly: ignore[explicit-any]
1717
text: str = " ",
1818
**kwargs: Any, # pyrefly: ignore[explicit-any]
1919
) -> SlackResponse:

twisted/twisted_site/views/admin/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def dispatch(
8181
) -> HttpResponseBase:
8282
if request.user.is_anonymous:
8383
return redirect("homepage")
84-
if not request.user.profile.is_staff: # pyright: ignore[reportAttributeAccessIssue] # pyrefly: ignore[missing-attribute]
84+
if not request.user.profile.is_staff: # ty:ignore[unresolved-attribute] # pyright: ignore[reportAttributeAccessIssue] # pyrefly: ignore[missing-attribute]
8585
return redirect("dashboard")
8686
self.audit_log = AuditLog(
8787
user=request.user,

twisted/twisted_site/views/admin/pathways.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def get(self, request: HttpRequest, id: int) -> HttpResponse:
129129
"profile"
130130
)
131131

132-
participants: list[dict[str, Any]] = [
132+
participants: list[dict[str, Any]] = [ # pyrefly: ignore[explicit-any]
133133
{
134134
"user": user,
135135
"mins": mins_per_participant[user.id], # ty:ignore[unresolved-attribute] # pyright: ignore[reportAttributeAccessIssue]
@@ -143,7 +143,7 @@ def get(self, request: HttpRequest, id: int) -> HttpResponse:
143143
}
144144
for user in users
145145
]
146-
participants.sort(key=lambda p: p["mins"], reverse=True)
146+
participants.sort(key=lambda p: p["mins"], reverse=True) # pyrefly: ignore[implicit-any-lambda]
147147

148148
context["participants"] = participants
149149
context["qualified_count"] = sum(1 for p in participants if p["qualified"])

twisted/twisted_site/views/ari.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def _quote_block(value: str) -> str:
1919
lines = _escape_mrkdwn(value).splitlines()
2020
if len(lines) == 0:
2121
lines = [""]
22+
2223
return "\n".join(f"> {line}" for line in lines)
2324

2425

twisted/twisted_site/views/client/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class LoginView(View):
3737
def post(self, request: HttpRequest) -> HttpResponse:
3838
if (
3939
request.user.is_authenticated
40-
and request.user.profile.hackatime_access_token
40+
and request.user.profile.hackatime_access_token # ty:ignore[unresolved-attribute] # pyright: ignore[reportAttributeAccessIssue] # pyrefly: ignore[missing-attribute]
4141
):
4242
return redirect("dashboard")
4343

twisted/twisted_site/views/client/journal.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import math
22
import re
3-
from typing import Any
43

54
from django.http import HttpRequest, HttpResponse
65
from django.shortcuts import get_object_or_404, redirect, render

twisted/twisted_site/views/client/projects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def post(self, request: HttpRequest) -> HttpResponse:
5454
project_url = f"{self.request.scheme}://{self.request.get_host()}{resolve_url('dashboard')}?project={project.id}" # ty:ignore[unresolved-attribute] # pyright: ignore[reportAttributeAccessIssue]
5555

5656
log_to_channel(
57-
f"*{request.user.profile.slack_username}* created a <{project_url}|new project>!\n- *Name*: {project_name}\n- *Description*: {project_description}\n- {project_type.title()}"
57+
f"*{request.user.profile.slack_username}* created a <{project_url}|new project>!\n- *Name*: {project_name}\n- *Description*: {project_description}\n- {project_type.title()}" # ty:ignore[unresolved-attribute] # pyright: ignore[reportAttributeAccessIssue] # pyrefly: ignore[missing-attribute]
5858
)
5959

6060
return redirect("fr.projects.detail", project.id) # ty:ignore[unresolved-attribute] # pyright: ignore[reportAttributeAccessIssue]

0 commit comments

Comments
 (0)