PLW0602: fix
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -100,7 +100,6 @@ def profile(func: Callable) -> Callable:
|
||||
"""
|
||||
|
||||
def wrapper(*args: Any, **kwargs: Any) -> Any:
|
||||
global PROFS
|
||||
profiler = PROFS[func]
|
||||
|
||||
try:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user