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

Code before:
            self.run(**self.__run_kwargs, _reload=True)
            _TaipyLogger._get_logger().info("Gui server has been reloaded.")

    def stop(self):
        """
        Stop the web server.

        This function stops the underlying web server only in the situation where
        it was run in a separated thread: the *run_in_thread* parameter to the
        `(Gui.)run()^` method was set to True, or you are running in an IPython notebook
        context.
        """
        if hasattr(self, "_server") and hasattr(self._server, "_thread") and self._server._is_running:
            self._server.stop_thread()
            _TaipyLogger._get_logger().info("Gui server has been stopped.")

    def _get_autorization(self, client_id: t.Optional[str] = None, system: t.Optional[bool] = False):
        return contextlib.nullcontext()

    def set_favicon(self, favicon_path: t.Union[str, Path]):
        """
        Change the favicon for all clients.

        This function Allows to change dynamically the favicon for all connected client.
        favicon_path can be an URL (relative or not) or a file path.
        The *favicon* parameter to the `(Gui.)run^` can also be used to change the favicon at start.
        """
        if self.__favicon != favicon_path:
            self.__favicon = favicon_path
            url = self._get_content("__taipy_favicon", favicon_path, True)
            self._broadcast("taipy_favicon", url, message_type=_WsType.FAVICON)


Review comment (suggestion):
```suggestion
        The *favicon* parameter to `(Gui.)run()^` can also be used to change the favicon when the application starts.
```

Code after:

    def stop(self):
        """Stop the web server.

        This function stops the underlying web server only in the situation where
        it was run in a separated thread: the *run_in_thread* parameter to the
        `(Gui.)run()^` method was set to True, or you are running in an IPython notebook
        context.
        """
        if hasattr(self, "_server") and hasattr(self._server, "_thread") and self._server._is_running:
            self._server.stop_thread()
            _TaipyLogger._get_logger().info("Gui server has been stopped.")

    def _get_autorization(self, client_id: t.Optional[str] = None, system: t.Optional[bool] = False):
        return contextlib.nullcontext()

    def set_favicon(self, favicon_path: t.Union[str, Path], state: t.Optional[State] = None):
        """Change the favicon for all clients.

        This function dynamically changes the favicon of Taipy GUI pages for all connected client.
        favicon_path can be an URL (relative or not) or a file path.
        TODO The *favicon* parameter to `(Gui.)run()^` can also be used to change
         the favicon when the application starts.

        """
        if state or self.__favicon != favicon_path:
            if not state:
                self.__favicon = favicon_path
            url = self._get_content("__taipy_favicon", favicon_path, True)
            self._broadcast(
                "taipy_favicon", url, self._get_client_id() if state else None, message_type=_WsType.FAVICON
            )