fix sort script (#3696)

* fix sort script

* formatting

* script
This commit is contained in:
Abubakar Abid 2023-03-29 13:39:40 -07:00 committed by GitHub
parent df98c443f7
commit dc37ddb739
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -2,7 +2,7 @@
cd "$(dirname ${0})/.."
echo "Formatting the backend... Our style follows the Black code style."
echo "Formatting the client library.. Our style follows the Black code style."
python -m black test gradio_client
python -m isort --profile=black test gradio_client
python -m flake8 --ignore=E731,E501,E722,W503,E126,E203,F403 test gradio_client --exclude gradio_client/__init__.py

View File

@ -3,6 +3,8 @@
cd "$(dirname ${0})/.."
echo "Formatting the backend... Our style follows the Black code style."
python -m black gradio test client/python/gradio_client
python -m isort --profile=black gradio test client/python/gradio_client
python -m flake8 --ignore=E731,E501,E722,W503,E126,E203,F403 gradio test client/python/gradio_client --exclude gradio/__init__.py,client/python/gradio_client/__init__.py
python -m black gradio test
python -m isort --profile=black gradio test
python -m flake8 --ignore=E731,E501,E722,W503,E126,E203,F403 gradio test --exclude gradio/__init__.py
bash client/python/scripts/format.sh # Call the client library's formatting script

View File

@ -21,11 +21,11 @@ import websockets
from fastapi.testclient import TestClient
import gradio as gr
from gradio.events import SelectData
from gradio.exceptions import DuplicateBlockError
from gradio.networking import Server, get_first_available_port
from gradio.test_data.blocks_configs import XRAY_CONFIG
from gradio.utils import assert_configs_are_equivalent_besides_ids
from gradio.events import SelectData
pytest_plugins = ("pytest_asyncio",)
@ -1468,9 +1468,7 @@ class TestAddRequests:
inputs = [1, 2]
request = gr.Request()
inputs_ = gr.helpers.special_args(
moo, copy.deepcopy(inputs), request
)[0]
inputs_ = gr.helpers.special_args(moo, copy.deepcopy(inputs), request)[0]
assert inputs_ == inputs + [request, 42]
def moo(a, b, req: gr.Request, c=42, pr=pr):