Repository: Avaiga/taipy
File: taipy/_run.py (Python)

Code before:
import sys
import typing as t

from flask import Flask

from taipy.core import Orchestrator
from taipy.gui import Gui
from taipy.rest import Rest

if sys.version_info >= (3, 10):
    from typing import TypeGuard

_AppType = t.Union[Gui, Rest, Orchestrator]
_AppTypeT = t.TypeVar("_AppTypeT", Gui, Rest, Orchestrator)


def _run(*services: _AppType, **kwargs) -> t.Optional[Flask]:
    """Run one or multiple Taipy services.

    A Taipy service is an instance of a class that runs code as a Web application.

    Arguments:
        *services (Union[`Gui^`, `Rest^`, `Orchestrator^`]): Services to run, as separate arguments.<br/>
            If several services are provided, all the services run simultaneously.<br/>
            If this is empty or set to None, this method does nothing.
        **kwargs: Other Arguments to provide to the services.
    """

    gui = __get_app(services, Gui)
    rest = __get_app(services, Rest)
    orchestrator = __get_app(services, Orchestrator)

    if gui and orchestrator:
        from taipy.core._cli._core_cli_factory import _CoreCLIFactory
        from taipy.gui._gui_cli import _GuiCLI

        _CoreCLIFactory._build_cli().create_parser()
        _GuiCLI.create_parser()

    if rest or orchestrator:
        if not orchestrator:
            orchestrator = Orchestrator()
        orchestrator.run()

    if not rest and not gui:
        return None

    if gui and rest:
        gui._set_flask(rest._app)  # type: ignore[union-attr]
        return gui.run(**kwargs)
    else:

Review comment (suggestion):
```suggestion
        **kwargs: Other parameters to provide to the services.
```

Code after:
import sys
import typing as t

from flask import Flask

from taipy.core import Orchestrator
from taipy.gui import Gui
from taipy.rest import Rest

if sys.version_info >= (3, 10):
    from typing import TypeGuard

_AppType = t.Union[Gui, Rest, Orchestrator]
_AppTypeT = t.TypeVar("_AppTypeT", Gui, Rest, Orchestrator)


def _run(*services: _AppType, **kwargs) -> t.Optional[Flask]:
    """Run one or multiple Taipy services.

    A Taipy service is an instance of a class that runs code as a Web application.

    Arguments:
        *services (Union[`Gui^`, `Rest^`, `Orchestrator^`]): Services to run, as separate arguments.<br/>
            If several services are provided, all the services run simultaneously.<br/>
            If this is empty or set to None, this method does nothing.
        **kwargs: Other parameters to provide to the services.
    """

    gui = __get_app(services, Gui)
    rest = __get_app(services, Rest)
    orchestrator = __get_app(services, Orchestrator)

    if gui and orchestrator:
        from taipy.core._cli._core_cli_factory import _CoreCLIFactory
        from taipy.gui._gui_cli import _GuiCLI

        _CoreCLIFactory._build_cli().create_parser()
        _GuiCLI.create_parser()

    if rest or orchestrator:
        if not orchestrator:
            orchestrator = Orchestrator()
        orchestrator.run()

    if not rest and not gui:
        return None

    if gui and rest:
        gui._set_flask(rest._app)  # type: ignore[union-attr]
        return gui.run(**kwargs)
    else: