chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224)

This commit is contained in:
Bowen Liang
2025-05-06 11:58:49 +08:00
committed by GitHub
parent 4b77c9df9d
commit 8537abfff8
141 changed files with 212 additions and 202 deletions

View File

@@ -1,4 +1,4 @@
from flask_restful import marshal_with # type: ignore
from flask_restful import marshal_with
from controllers.common import fields
from controllers.web import api

View File

@@ -65,7 +65,7 @@ class AudioApi(WebApiResource):
class TextApi(WebApiResource):
def post(self, app_model: App, end_user):
from flask_restful import reqparse # type: ignore
from flask_restful import reqparse
try:
parser = reqparse.RequestParser()

View File

@@ -1,6 +1,6 @@
import logging
from flask_restful import reqparse # type: ignore
from flask_restful import reqparse
from werkzeug.exceptions import InternalServerError, NotFound
import services

View File

@@ -1,5 +1,5 @@
from flask_restful import marshal_with, reqparse # type: ignore
from flask_restful.inputs import int_range # type: ignore
from flask_restful import marshal_with, reqparse
from flask_restful.inputs import int_range
from sqlalchemy.orm import Session
from werkzeug.exceptions import NotFound

View File

@@ -1,4 +1,4 @@
from flask_restful import Resource # type: ignore
from flask_restful import Resource
from controllers.web import api
from services.feature_service import FeatureService

View File

@@ -1,5 +1,5 @@
from flask import request
from flask_restful import marshal_with # type: ignore
from flask_restful import marshal_with
import services
from controllers.common.errors import FilenameNotExistsError

View File

@@ -1,7 +1,7 @@
import logging
from flask_restful import fields, marshal_with, reqparse # type: ignore
from flask_restful.inputs import int_range # type: ignore
from flask_restful import fields, marshal_with, reqparse
from flask_restful.inputs import int_range
from werkzeug.exceptions import InternalServerError, NotFound
import services

View File

@@ -1,7 +1,7 @@
import uuid
from flask import request
from flask_restful import Resource # type: ignore
from flask_restful import Resource
from werkzeug.exceptions import NotFound, Unauthorized
from controllers.web import api

View File

@@ -1,7 +1,7 @@
import urllib.parse
import httpx
from flask_restful import marshal_with, reqparse # type: ignore
from flask_restful import marshal_with, reqparse
import services
from controllers.common import helpers

View File

@@ -1,5 +1,5 @@
from flask_restful import fields, marshal_with, reqparse # type: ignore
from flask_restful.inputs import int_range # type: ignore
from flask_restful import fields, marshal_with, reqparse
from flask_restful.inputs import int_range
from werkzeug.exceptions import NotFound
from controllers.web import api

View File

@@ -1,4 +1,4 @@
from flask_restful import fields, marshal_with # type: ignore
from flask_restful import fields, marshal_with
from werkzeug.exceptions import Forbidden
from configs import dify_config

View File

@@ -1,6 +1,6 @@
import logging
from flask_restful import reqparse # type: ignore
from flask_restful import reqparse
from werkzeug.exceptions import InternalServerError
from controllers.web import api

View File

@@ -1,7 +1,7 @@
from functools import wraps
from flask import request
from flask_restful import Resource # type: ignore
from flask_restful import Resource
from werkzeug.exceptions import BadRequest, NotFound, Unauthorized
from controllers.web.error import WebSSOAuthRequiredError