Skip to content

Commit 0dd778e

Browse files
committed
fixing lint issues
1 parent 916efdc commit 0dd778e

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

dash/_callback.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from functools import wraps
44
from typing import Callable, Optional, Any
55

6-
import flask
76
import asyncio
7+
import flask
88

99
from .dependencies import (
1010
handle_callback_args,
@@ -46,9 +46,8 @@ async def _async_invoke_callback(
4646
# Check if the function is a coroutine function
4747
if asyncio.iscoroutinefunction(func):
4848
return await func(*args, **kwargs) # %% callback invoked %%
49-
else:
50-
# If the function is not a coroutine, call it directly
51-
return func(*args, **kwargs) # %% callback invoked %%
49+
# If the function is not a coroutine, call it directly
50+
return func(*args, **kwargs) # %% callback invoked %%
5251

5352

5453
def _invoke_callback(func, *args, **kwargs): # used to mark the frame for the debugger
@@ -83,7 +82,6 @@ def callback(
8382
manager=None,
8483
cache_args_to_ignore=None,
8584
on_error: Optional[Callable[[Exception], Any]] = None,
86-
use_async=False,
8785
**_kwargs,
8886
):
8987
"""

dash/dash.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
from urllib.parse import urlparse
1919
from typing import Any, Callable, Dict, Optional, Union, List
2020

21-
import flask
2221
import asyncio
22+
import flask
2323

2424
from importlib_metadata import version as _get_distribution_version
2525

@@ -205,9 +205,8 @@ async def execute_async_function(func, *args, **kwargs):
205205
# Check if the function is a coroutine function
206206
if asyncio.iscoroutinefunction(func):
207207
return await func(*args, **kwargs)
208-
else:
209-
# If the function is not a coroutine, call it directly
210-
return func(*args, **kwargs)
208+
# If the function is not a coroutine, call it directly
209+
return func(*args, **kwargs)
211210

212211

213212
# pylint: disable=too-many-instance-attributes

0 commit comments

Comments
 (0)