chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224)
This commit is contained in:
parent
4b77c9df9d
commit
8537abfff8
141 changed files with 212 additions and 202 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue