PLW0602: fix

This commit is contained in:
Jörg Thalheim
2025-08-20 20:05:52 +02:00
parent a7bce4cb19
commit 1dda60847e
4 changed files with 0 additions and 6 deletions

View File

@@ -91,7 +91,6 @@ def get_system_file(
def gtk_open_file(file_request: FileRequest, op_key: str) -> bool:
def returns(data: SuccessDataClass | ErrorDataClass) -> None:
global RESULT
RESULT[op_key] = data
def on_file_select(file_dialog: Gtk.FileDialog, task: Gio.Task) -> None:

View File

@@ -100,7 +100,6 @@ def profile(func: Callable) -> Callable:
"""
def wrapper(*args: Any, **kwargs: Any) -> Any:
global PROFS
profiler = PROFS[func]
try:

View File

@@ -108,15 +108,12 @@ def set_should_cancel(should_cancel: Callable[[], bool]) -> None:
def get_async_ctx() -> AsyncContext:
"""Retrieve the current AsyncContext, creating a new one if none exists."""
global ASYNC_CTX_THREAD_LOCAL
if not hasattr(ASYNC_CTX_THREAD_LOCAL, "async_ctx"):
ASYNC_CTX_THREAD_LOCAL.async_ctx = AsyncContext()
return ASYNC_CTX_THREAD_LOCAL.async_ctx
def set_async_ctx(ctx: AsyncContext) -> None:
global ASYNC_CTX_THREAD_LOCAL
ASYNC_CTX_THREAD_LOCAL.async_ctx = ctx

View File

@@ -404,7 +404,6 @@ def run(
if not is_async_cancelled():
process.wait()
global TIME_TABLE
if TIME_TABLE:
TIME_TABLE.add(shlex.join(cmd), timeit.default_timer() - start)