Skip to content

Commit 055ca95

Browse files
committed
Fix some lint errors found by the updated linters
1 parent 325ebf3 commit 055ca95

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

atr/static/js/src/upload-progress.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ function setupXhrHandlers(
5555
ui,
5656
index,
5757
state,
58-
addRetryButton,
59-
checkAllComplete,
58+
addRetryButtonFn,
59+
checkAllCompleteFn,
6060
) {
6161
const ctx = {
6262
ui,
6363
index,
6464
state,
65-
addRetryButton,
66-
checkAllComplete,
65+
addRetryButton: addRetryButtonFn,
66+
checkAllComplete: checkAllCompleteFn,
6767
activeUploads: state.activeUploads,
6868
statusEl: ui.querySelector(".upload-status"),
6969
cancelBtn: ui.querySelector(".cancel-btn"),
@@ -109,13 +109,13 @@ function startUpload(
109109
state,
110110
stageUrl,
111111
csrfToken,
112-
addRetryButton,
112+
addRetryButtonFn,
113113
checkComplete,
114114
) {
115115
const ui = document.getElementById(`upload-file-${index}`);
116116
const xhr = new XMLHttpRequest();
117117
state.activeUploads.set(index, xhr);
118-
setupXhrHandlers(xhr, ui, index, state, addRetryButton, checkComplete);
118+
setupXhrHandlers(xhr, ui, index, state, addRetryButtonFn, checkComplete);
119119
const formData = new FormData();
120120
formData.append("csrf_token", csrfToken);
121121
formData.append("file", file, file.name);

atr/util.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import uuid
3535
import zipfile
3636
from collections.abc import AsyncGenerator, Callable, Iterable, Sequence
37-
from typing import Any, Final, TypeVar
37+
from typing import Any, Final
3838

3939
import aiofiles.os
4040
import aiohttp
@@ -58,8 +58,6 @@
5858
import atr.tarzip as tarzip
5959
import atr.user as user
6060

61-
T = TypeVar("T")
62-
6361
ARCHIVE_ROOT_SUFFIXES: Final[tuple[str, ...]] = ("-source", "-src")
6462
DIRECTORY_PERMISSIONS: Final[int] = 0o755
6563
DEV_TEST_MID: Final[str] = "CAH5JyZo8QnWmg9CwRSwWY=GivhXW4NiLyeNJO71FKdK81J5-Uw@mail.gmail.com"
@@ -1152,7 +1150,7 @@ def unwrap[T](value: T | None, error_message: str = "unexpected None when unwrap
11521150
return value
11531151

11541152

1155-
def unwrap_type(value: T | None, t: type[T], error_message: str = "unexpected None when unwrapping value") -> T:
1153+
def unwrap_type[T](value: T | None, t: type[T], error_message: str = "unexpected None when unwrapping value") -> T:
11561154
"""
11571155
Will unwrap the given value or raise a TypeError if it is not of the expected type
11581156

0 commit comments

Comments
 (0)