Skip to content

Commit

Permalink
More signature updates
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jan 23, 2025
1 parent e17132f commit 9a0dcd5
Show file tree
Hide file tree
Showing 33 changed files with 136 additions and 136 deletions.
4 changes: 2 additions & 2 deletions panel/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def decode_response_body(response):
"""
Decodes the JSON-format response body
Arguments
---------
Parameters
----------
response: tornado.httpclient.HTTPResponse
Returns
Expand Down
4 changes: 2 additions & 2 deletions panel/chat/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def stream_to(obj, token: str, replace: bool = False, object_panel: Viewable | N
in a layout of `Column(Markdown(...), Image(...))` the Markdown
pane is updated.
Arguments
---------
Parameters
----------
token: str
The token to stream to the text pane.
replace: bool (default=False)
Expand Down
4 changes: 2 additions & 2 deletions panel/interact.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ class _InteractFactory:
"""
Factory for instances of :class:`interactive`.
Arguments
---------
Parameters
----------
cls: class
The subclass of :class:`interactive` to construct.
options: dict
Expand Down
4 changes: 2 additions & 2 deletions panel/io/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ def build_applications(
"""
Converts a variety of objects into a dictionary of Applications.
Arguments
---------
Parameters
----------
panel: Viewable, function or {str: Viewable}
A Panel object, a function returning a Panel object or a
dictionary mapping from the URL slug to either.
Expand Down
8 changes: 4 additions & 4 deletions panel/io/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ def compute_hash(func, hash_funcs, args, kwargs):
"""
Computes a hash given a function and its arguments.
Arguments
---------
Parameters
----------
func: callable
The function to cache.
hash_funcs: dict
Expand Down Expand Up @@ -411,8 +411,8 @@ def cache(
For global caching across user sessions use `pn.state.as_cached`.
Arguments
---------
Parameters
----------
func: callable
The function to cache.
hash_funcs: dict or None
Expand Down
28 changes: 14 additions & 14 deletions panel/io/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def find_module_bundles(module_spec: str) -> dict[pathlib.Path, list[ReactiveESM
"""
Takes module specifications and extracts a set of components to bundle.
Arguments
---------
Parameters
----------
module_spec: str
Module specification either as a dotted module or a path to a module.
Expand Down Expand Up @@ -138,8 +138,8 @@ def find_components(module_or_file: str | os.PathLike, classes: list[str] | None
Creates a temporary module given a path-like object and finds all
the ReactiveESM components defined therein.
Arguments
---------
Parameters
----------
module_or_file : str | os.PathLike
The path to the Python module.
classes: list[str] | None
Expand Down Expand Up @@ -186,8 +186,8 @@ def packages_from_code(esm_code: str) -> tuple[str, dict[str, str]]:
"""
Extracts package version definitions from ESM code.
Arguments
---------
Parameters
----------
esm_code : str
The ESM code to search for package imports.
Expand Down Expand Up @@ -215,8 +215,8 @@ def replace_imports(esm_code: str, replacements: dict[str, str]) -> str:
Replaces imports in the code which may be aliases with the actual
package names.
Arguments
---------
Parameters
----------
esm_code: str
The ESM code to replace import names in.
replacements: dict[str, str]
Expand Down Expand Up @@ -248,8 +248,8 @@ def packages_from_importmap(esm_code: str, imports: dict[str, str]) -> tuple[str
"""
Extracts package version definitions from an import map.
Arguments
---------
Parameters
----------
esm_code: str
The ESM code to replace import names in.
imports : dict[str, str]
Expand Down Expand Up @@ -281,8 +281,8 @@ def extract_dependencies(component: type[ReactiveESM]) -> tuple[str, dict[str, A
importmap and the associated code and replaces URL import
specifiers with package imports.
Arguments
---------
Parameters
----------
component: type[ReactiveESM]
The ReactiveESM component to extract a dependency definition from.
Expand Down Expand Up @@ -406,8 +406,8 @@ def compile_components(
Compiles a list of ReactiveESM components into a single JavaScript bundle
including their Javascript dependencies.
Arguments
---------
Parameters
----------
components : list[type[ReactiveESM]]
A list of `ReactiveESM` component classes to compile.
build_dir : str | os.PathLike, optional
Expand Down
8 changes: 4 additions & 4 deletions panel/io/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def script_to_html(
Converts a Panel or Bokeh script to a standalone WASM Python
application.
Arguments
---------
Parameters
----------
filename: str | Path | IO
The filename of the Panel/Bokeh application to convert.
requirements: 'auto' | List[str] | os.PathLike
Expand Down Expand Up @@ -481,8 +481,8 @@ def convert_apps(
verbose: bool = True,
):
"""
Arguments
---------
Parameters
----------
apps: str | List[str]
The filename(s) of the Panel/Bokeh application(s) to convert.
dest_path: str | pathlib.Path
Expand Down
8 changes: 4 additions & 4 deletions panel/io/datamodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ def construct_data_model(parameterized, name=None, ignore=[], types={}, extras={
Dynamically creates a Bokeh DataModel class from a Parameterized
object.
Arguments
---------
Parameters
----------
parameterized: param.Parameterized
The Parameterized class or instance from which to create the
DataModel
Expand Down Expand Up @@ -217,8 +217,8 @@ def create_linked_datamodel(obj, root=None):
Creates a Bokeh DataModel from a Parameterized class or instance
which automatically links the parameters bi-directionally.
Arguments
---------
Parameters
----------
obj: param.Parameterized
The Parameterized class to create a linked DataModel for.
Expand Down
16 changes: 8 additions & 8 deletions panel/io/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,8 @@ def with_lock(func: Callable) -> Callable:
Wrap a callback function to execute with a lock allowing the
function to modify bokeh models directly.
Arguments
---------
Parameters
----------
func: callable
The callable to wrap
Expand Down Expand Up @@ -441,8 +441,8 @@ def unlocked(policy: HoldPolicyType = 'combine') -> Iterator:
ModelChangedEvents triggered in the context body to all sockets
on current sessions.
Arguments
---------
Parameters
----------
policy: Literal['combine' | 'collect']
One of 'combine' or 'collect' determining whether events
setting the same property are combined or accumulated to be
Expand Down Expand Up @@ -537,8 +537,8 @@ def hold(doc: Document | None = None, policy: HoldPolicyType = 'combine', comm:
manager exits. This allows multiple events on the same object to
be combined if the policy is set to 'combine'.
Arguments
---------
Parameters
----------
doc: Document
The Bokeh Document to hold events on.
policy: HoldPolicyType
Expand Down Expand Up @@ -578,8 +578,8 @@ def immediate_dispatch(doc: Document | None = None):
inside the execution context even when Document events are
currently on hold.
Arguments
---------
Parameters
----------
doc: Document
The document to dispatch events on (if `None` then `state.curdoc` is used).
"""
Expand Down
4 changes: 2 additions & 2 deletions panel/io/embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ def embed_state(panel, model, doc, max_states=1000, max_opts=3,
be replayed when exported. The state is recorded on a State model
which is attached as an additional root on the Document.
Arguments
---------
Parameters
----------
panel: panel.reactive.Reactive
The Reactive component being exported
model: bokeh.model.Model
Expand Down
16 changes: 8 additions & 8 deletions panel/io/fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def add_applications(
"""
Adds application(s) to an existing FastAPI application.
Arguments
---------
Parameters
----------
app: FastAPI
FastAPI app to add Panel application(s) to.
panel: Viewable, function or {str: Viewable}
Expand Down Expand Up @@ -157,8 +157,8 @@ def add_application(
"""
Decorator that adds a Panel app to a FastAPI application.
Arguments
---------
Parameters
----------
path: str
The path to serve the application on.
app: FastAPI
Expand Down Expand Up @@ -202,8 +202,8 @@ def get_server(
"""
Creates a FastAPI server running the provided Panel application(s).
Arguments
---------
Parameters
----------
panel: Viewable, function or {str: Viewable}
A Panel object, a function returning a Panel object or a
dictionary mapping from the URL slug to either.
Expand Down Expand Up @@ -315,8 +315,8 @@ def serve(
Reference: https://panel.holoviz.org/user_guide/Server_Configuration.html#serving-multiple-apps
Arguments
---------
Parameters
----------
panel: Viewable, function or {str: Viewable or function}
A Panel object, a function returning a Panel object or a
dictionary mapping from the URL slug to either.
Expand Down
4 changes: 2 additions & 2 deletions panel/io/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ def parse_notebook(
"""
Parses a notebook on disk and returns a script.
Arguments
---------
Parameters
----------
filename: str | os.PathLike
The notebook file to parse.
preamble: list[str]
Expand Down
4 changes: 2 additions & 2 deletions panel/io/jupyter_server_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ def generate_executor(path: str, token: str, root_url: str) -> str:
Generates the code to instantiate a PanelExecutor that is to
be be run on the kernel to start a server session.
Arguments
---------
Parameters
----------
path: str
The path of the Panel application to execute.
token: str
Expand Down
8 changes: 4 additions & 4 deletions panel/io/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def start_loading_spinner(*objects):
* disabling the panel
* and changing the mouse cursor to a spinner when hovering over the panel
Arguments
---------
Parameters
----------
objects: tuple
The panels to add the loading indicator to.
"""
Expand All @@ -49,8 +49,8 @@ def stop_loading_spinner(*objects):
"""
Removes the loading indicating from the specified panel objects.
Arguments
---------
Parameters
----------
objects: tuple
The panels to remove the loading indicator from.
"""
Expand Down
4 changes: 2 additions & 2 deletions panel/io/mime_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ def exec_with_return(
Executes a code snippet and returns the resulting output of the
last line.
Arguments
---------
Parameters
----------
code: str
The code to execute
global_context: Dict[str, Any]
Expand Down
4 changes: 2 additions & 2 deletions panel/io/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ def hold(doc: Document | None = None, policy: HoldPolicyType = 'combine', comm:
manager exits. This allows multiple events on the same object to
be combined if the policy is set to 'combine'.
Arguments
---------
Parameters
----------
doc: Document
The Bokeh Document to hold events on.
policy: HoldPolicyType
Expand Down
16 changes: 8 additions & 8 deletions panel/io/notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ def push_notebook(*objs: Viewable) -> None:
object. This is required when modifying any Bokeh object directly
in a notebook session.
Arguments
---------
Parameters
----------
objs: panel.viewable.Viewable
"""
for obj in objs:
Expand Down Expand Up @@ -447,8 +447,8 @@ def show_server(panel: Any, notebook_url: str, port: int = 0) -> Server:
"""
Displays a bokeh server inline in the notebook.
Arguments
---------
Parameters
----------
panel: Viewable
Panel Viewable object to launch a server for
notebook_url: str
Expand Down Expand Up @@ -502,8 +502,8 @@ def render_embed(
this will only work well for simple apps with a relatively
small state space.
Arguments
---------
Parameters
----------
max_states: int
The maximum number of states to embed
max_opts: int
Expand Down Expand Up @@ -542,8 +542,8 @@ def ipywidget(obj: Any, doc=None, **kwargs: Any):
Requires `jupyter_bokeh` to be installed.
Arguments
---------
Parameters
----------
obj: object
Any Panel object or object which can be rendered with Panel
doc: bokeh.Document
Expand Down
Loading

0 comments on commit 9a0dcd5

Please sign in to comment.