Skip to content

Commit ecb3d4f

Browse files
committed
Post fix
1 parent 27eb1e3 commit ecb3d4f

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

api/app_factory.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def create_flask_app_with_configs() -> DifyApp:
1919

2020
# add before request hook
2121
@dify_app.before_request
22-
def before_request(): # pyright: ignore[reportUnusedFunction]
22+
def before_request(): # pyright: ignore[reportUnusedFunction]
2323
# add an unique identifier to each request
2424
RecyclableContextVar.increment_thread_recycles()
2525

api/core/extension/extension.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def extension_class(self, module: ExtensionModule, extension_name: str) -> type:
4242
return t
4343

4444
def validate_form_schema(self, module: ExtensionModule, extension_name: str, config: dict) -> None:
45+
pass
4546
# module_extension = self.module_extension(module, extension_name)
4647
# form_schema = module_extension.form_schema
4748
# TODO validate form_schema
48-
pass

api/extensions/ext_app_metrics.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@
1010

1111
def init_app(app: DifyApp):
1212
@app.after_request
13-
def after_request(response): # pyright: ignore[reportUnusedFunction]
13+
def after_request(response): # pyright: ignore[reportUnusedFunction]
1414
"""Add Version headers to the response."""
1515
response.headers.add("X-Version", dify_config.CURRENT_VERSION)
1616
response.headers.add("X-Env", dify_config.DEPLOY_ENV)
1717
return response
1818

1919
@app.route("/health")
20-
def health(): # pyright: ignore[reportUnusedFunction]
20+
def health(): # pyright: ignore[reportUnusedFunction]
2121
return Response(
2222
json.dumps({"pid": os.getpid(), "status": "ok", "version": dify_config.CURRENT_VERSION}),
2323
status=200,
2424
content_type="application/json",
2525
)
2626

2727
@app.route("/threads")
28-
def threads(): # pyright: ignore[reportUnusedFunction]
28+
def threads(): # pyright: ignore[reportUnusedFunction]
2929
num_threads = threading.active_count()
3030
threads = threading.enumerate()
3131

@@ -50,7 +50,7 @@ def threads(): # pyright: ignore[reportUnusedFunction]
5050
}
5151

5252
@app.route("/db-pool-stat")
53-
def pool_stat(): # pyright: ignore[reportUnusedFunction]
53+
def pool_stat(): # pyright: ignore[reportUnusedFunction]
5454
from extensions.ext_database import db
5555

5656
engine = db.engine

api/tasks/batch_create_segment_to_index_task.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import click
77
from celery import shared_task # type: ignore
8-
from sqlalchemy import func, select
8+
from sqlalchemy import func
99
from sqlalchemy.orm import Session
1010

1111
from core.model_manager import ModelManager

api/tests/integration_tests/vdb/opengauss/test_opengauss.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import time
22

3-
import psycopg2 # type: ignore
3+
import psycopg2 # type: ignore
44

55
from core.rag.datasource.vdb.opengauss.opengauss import OpenGauss, OpenGaussConfig
66
from tests.integration_tests.vdb.test_vector_store import (

api/tests/unit_tests/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ def app() -> Flask:
1818

1919

2020
@pytest.fixture(autouse=True)
21-
def _provide_app_context(app: Flask): # pyright: ignore[reportUnusedFunction]
21+
def _provide_app_context(app: Flask): # pyright: ignore[reportUnusedFunction]
2222
with app.app_context():
2323
yield

0 commit comments

Comments
 (0)