mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-24 10:54:04 +08:00
fix lint (#7075)
This commit is contained in:
parent
02791f1a83
commit
1fc8a94138
6
.changeset/clear-papayas-hear.md
Normal file
6
.changeset/clear-papayas-hear.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"gradio": patch
|
||||
"gradio_client": patch
|
||||
---
|
||||
|
||||
feat:fix lint
|
@ -841,13 +841,18 @@ class Client:
|
||||
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"]))
|
||||
|
@ -1,7 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import inspect
|
||||
import json
|
||||
import re
|
||||
import types
|
||||
import typing
|
||||
|
Loading…
Reference in New Issue
Block a user