Skip to content

Commit

Permalink
Run black (fix CI) (#1831)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert authored Jan 29, 2025
1 parent d562055 commit a06b3fe
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion shiny/_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ def noop_server_fn(input: Inputs, output: Outputs, session: Session) -> None:


def wrap_server_fn_with_output_session(
server: Callable[[Inputs], None]
server: Callable[[Inputs], None],
) -> Callable[[Inputs, Outputs, Session], None]:
def _server(input: Inputs, output: Outputs, session: Session):
# Only has 1 parameter, ignore output, session
Expand Down
4 changes: 2 additions & 2 deletions shiny/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def private_seed() -> Generator[None, None, None]:


def wrap_async(
fn: Callable[P, R] | Callable[P, Awaitable[R]]
fn: Callable[P, R] | Callable[P, Awaitable[R]],
) -> Callable[P, Awaitable[R]]:
"""
Given a synchronous function that returns R, return an async function that wraps the
Expand Down Expand Up @@ -338,7 +338,7 @@ async def fn_async(*args: P.args, **kwargs: P.kwargs) -> R:
# This function should generally be used in this code base instead of
# `iscoroutinefunction()`.
def is_async_callable(
obj: Callable[P, R] | Callable[P, Awaitable[R]]
obj: Callable[P, R] | Callable[P, Awaitable[R]],
) -> TypeGuard[Callable[P, Awaitable[R]]]:
"""
Determine if an object is an async function.
Expand Down
2 changes: 1 addition & 1 deletion shiny/express/_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

@add_example(ex_dir="../api-examples/express_module")
def module(
fn: Callable[Concatenate[Inputs, Outputs, Session, P], R]
fn: Callable[Concatenate[Inputs, Outputs, Session, P], R],
) -> Callable[Concatenate[Id, P], R]:
"""
Create a Shiny module using Shiny Express syntax
Expand Down
2 changes: 1 addition & 1 deletion shiny/express/_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def wrapper(renderer: RendererT) -> RendererT:


def suspend_display(
fn: Callable[P, R] | RendererT | None = None
fn: Callable[P, R] | RendererT | None = None,
) -> Callable[P, R] | RendererT | AbstractContextManager[None]:
warn_deprecated(
"`suspend_display` is deprecated. Please use `ui.hold` instead. "
Expand Down
2 changes: 1 addition & 1 deletion shiny/express/_recall_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def tagify(self) -> Tag | TagList | MetadataNode | str:


def wrap_recall_context_manager(
fn: Callable[P, R]
fn: Callable[P, R],
) -> Callable[P, RecallContextManager[R]]:
@functools.wraps(fn)
def wrapped_fn(*args: P.args, **kwargs: P.kwargs) -> RecallContextManager[R]:
Expand Down
2 changes: 1 addition & 1 deletion shiny/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def wrapper(id: Id, *args: P.args, **kwargs: P.kwargs) -> R:

@no_example()
def server(
fn: Callable[Concatenate[Inputs, Outputs, Session, P], R]
fn: Callable[Concatenate[Inputs, Outputs, Session, P], R],
) -> Callable[Concatenate[str, P], R]:
from .session import require_active_session, session_context

Expand Down
2 changes: 1 addition & 1 deletion shiny/reactive/_extended_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def extended_task(func: Callable[P, Awaitable[R]]) -> ExtendedTask[P, R]: ...

@add_example()
def extended_task(
func: Optional[Callable[P, Awaitable[R]]] = None
func: Optional[Callable[P, Awaitable[R]]] = None,
) -> ExtendedTask[P, R] | Callable[[Callable[P, Awaitable[R]]], ExtendedTask[P, R]]:
"""
Decorator to mark an async function as a slow computation. This will cause the
Expand Down
2 changes: 1 addition & 1 deletion shiny/ui/_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def markdown(


def default_md_renderer(
preset: Literal["commonmark", "gfm"] = "gfm"
preset: Literal["commonmark", "gfm"] = "gfm",
) -> Callable[[str], str]:
try:
from markdown_it.main import MarkdownIt
Expand Down
2 changes: 1 addition & 1 deletion tests/pytest/test_navs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Tests for """
"""Tests for"""

import contextlib
import random
Expand Down

0 comments on commit a06b3fe

Please sign in to comment.