From c8411c75c60d054934419e10a96dfadf598dc2e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20=C3=96zdemir?= Date: Wed, 2 Mar 2022 18:14:53 +0300 Subject: [PATCH] Block-Events - format backend --- gradio/__init__.py | 1 + gradio/blocks.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gradio/__init__.py b/gradio/__init__.py index c6c85cb55b..8a9b9b4ab7 100644 --- a/gradio/__init__.py +++ b/gradio/__init__.py @@ -11,5 +11,6 @@ from gradio.interface import Interface, close_all, reset_all from gradio.mix import Parallel, Series from gradio.routes import get_state, set_state from gradio.static import Button, Markdown + current_pkg_version = pkg_resources.require("gradio")[0].version __version__ = current_pkg_version diff --git a/gradio/blocks.py b/gradio/blocks.py index c6e3e34fa2..b9450e6634 100644 --- a/gradio/blocks.py +++ b/gradio/blocks.py @@ -34,7 +34,9 @@ class Block: } ) - def change(self, fn: str, inputs: List["Component"], outputs: List["Component"]) -> None: + def change( + self, fn: str, inputs: List["Component"], outputs: List["Component"] + ) -> None: """ Adds change event to the component's dependencies. @@ -62,7 +64,9 @@ class Block: } ) - def save(self, fn: str, inputs: List["Component"], outputs: List["Component"]) -> None: + def save( + self, fn: str, inputs: List["Component"], outputs: List["Component"] + ) -> None: """ Adds save event to the component's dependencies.