Skip to content

Commit

Permalink
Add type annotations and refactor some APIs
Browse files Browse the repository at this point in the history
- Add role and optional argument for auth_required.
- Rename openapi._OpenAPIMixin to openapi.OpenAPI
- Rename module scaffold to utils
- Change scaffold.Scaffold to utils.method_route
- Change _AuthErrorMixin to function handle_auth_error
- Return None for current_user if not found
- Merge openapi module back to app
- Add mypy check in tox.ini
- Change flake-8 max-line-length to 100
  • Loading branch information
greyli committed Mar 29, 2021
1 parent 49180e7 commit 5cbf27e
Show file tree
Hide file tree
Showing 17 changed files with 993 additions and 823 deletions.
20 changes: 13 additions & 7 deletions apiflask/__init__.py
@@ -1,9 +1,15 @@
from .app import APIFlask # noqa: F401
from .blueprint import APIBlueprint # noqa: F401
from .decorators import auth_required, input, output, doc # noqa: F401
from .errors import HTTPError, api_abort # noqa: F401
from .schemas import Schema # noqa: F401
from .fields import fields # noqa: F401
from .security import HTTPBasicAuth, HTTPTokenAuth # noqa: F401
# flake8: noqa
from .app import APIFlask
from .blueprint import APIBlueprint
from .decorators import input
from .decorators import output
from .decorators import doc
from .decorators import auth_required
from .errors import api_abort
from .errors import HTTPError
from .schemas import Schema
from . import fields
from .security import HTTPBasicAuth
from .security import HTTPTokenAuth

__version__ = '0.3.0dev'

0 comments on commit 5cbf27e

Please sign in to comment.