This is an automated email from the ASF dual-hosted git repository. sbp pushed a commit to branch sbp in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
commit 055ca95b771a5068999c7ee6a9a1e7ae77132215 Author: Sean B. Palmer <[email protected]> AuthorDate: Tue Feb 17 14:34:07 2026 +0000 Fix some lint errors found by the updated linters --- atr/static/js/src/upload-progress.js | 12 ++++++------ atr/util.py | 6 ++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/atr/static/js/src/upload-progress.js b/atr/static/js/src/upload-progress.js index a9ef76ad..c1625502 100644 --- a/atr/static/js/src/upload-progress.js +++ b/atr/static/js/src/upload-progress.js @@ -55,15 +55,15 @@ function setupXhrHandlers( ui, index, state, - addRetryButton, - checkAllComplete, + addRetryButtonFn, + checkAllCompleteFn, ) { const ctx = { ui, index, state, - addRetryButton, - checkAllComplete, + addRetryButton: addRetryButtonFn, + checkAllComplete: checkAllCompleteFn, activeUploads: state.activeUploads, statusEl: ui.querySelector(".upload-status"), cancelBtn: ui.querySelector(".cancel-btn"), @@ -109,13 +109,13 @@ function startUpload( state, stageUrl, csrfToken, - addRetryButton, + addRetryButtonFn, checkComplete, ) { const ui = document.getElementById(`upload-file-${index}`); const xhr = new XMLHttpRequest(); state.activeUploads.set(index, xhr); - setupXhrHandlers(xhr, ui, index, state, addRetryButton, checkComplete); + setupXhrHandlers(xhr, ui, index, state, addRetryButtonFn, checkComplete); const formData = new FormData(); formData.append("csrf_token", csrfToken); formData.append("file", file, file.name); diff --git a/atr/util.py b/atr/util.py index 9cb3c820..e03ef41e 100644 --- a/atr/util.py +++ b/atr/util.py @@ -34,7 +34,7 @@ import unicodedata import uuid import zipfile from collections.abc import AsyncGenerator, Callable, Iterable, Sequence -from typing import Any, Final, TypeVar +from typing import Any, Final import aiofiles.os import aiohttp @@ -58,8 +58,6 @@ import atr.registry as registry import atr.tarzip as tarzip import atr.user as user -T = TypeVar("T") - ARCHIVE_ROOT_SUFFIXES: Final[tuple[str, ...]] = ("-source", "-src") DIRECTORY_PERMISSIONS: Final[int] = 0o755 DEV_TEST_MID: Final[str] = "CAH5JyZo8QnWmg9CwRSwWY=givhxw4nilyenjo71fkdk81j5...@mail.gmail.com" @@ -1152,7 +1150,7 @@ def unwrap[T](value: T | None, error_message: str = "unexpected None when unwrap return value -def unwrap_type(value: T | None, t: type[T], error_message: str = "unexpected None when unwrapping value") -> T: +def unwrap_type[T](value: T | None, t: type[T], error_message: str = "unexpected None when unwrapping value") -> T: """ Will unwrap the given value or raise a TypeError if it is not of the expected type --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
