Skip to content

Commit

Permalink
fix lint (#7075)
Browse files Browse the repository at this point in the history
  • Loading branch information
freddyaboulton committed Jan 19, 2024
1 parent 02791f1 commit 1fc8a94
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/clear-papayas-hear.md
@@ -0,0 +1,6 @@
---
"gradio": patch
"gradio_client": patch
---

feat:fix lint
9 changes: 7 additions & 2 deletions client/python/gradio_client/client.py
Expand Up @@ -841,13 +841,18 @@ def deploy_discord(
metadata={"tags": ["gradio-discord-bot"]},
)

with open(str(Path(__file__).parent / "templates" / "discord_chat.py"),encoding="utf-8") as f:
with open(
str(Path(__file__).parent / "templates" / "discord_chat.py"),
encoding="utf-8",
) as f:
app = f.read()
app = app.replace("<<app-src>>", self.src)
app = app.replace("<<api-name>>", api_names[0][0])
app = app.replace("<<command-name>>", api_names[0][1])

with tempfile.NamedTemporaryFile(mode="w", delete=False,encoding="utf-8") as app_file:
with tempfile.NamedTemporaryFile(
mode="w", delete=False, encoding="utf-8"
) as app_file:
with tempfile.NamedTemporaryFile(mode="w", delete=False) as requirements:
app_file.write(app)
requirements.write("\n".join(["discord.py==2.3.1"]))
Expand Down
1 change: 0 additions & 1 deletion gradio/cli/commands/components/_docs_utils.py
@@ -1,7 +1,6 @@
from __future__ import annotations

import inspect
import json
import re
import types
import typing
Expand Down

0 comments on commit 1fc8a94

Please sign in to comment.