[pre-commit.ci lite] apply automatic fixes
This commit is contained in:
parent
23da63f6d1
commit
ed1703dfcd
2 changed files with 3 additions and 0 deletions
|
|
@ -92,6 +92,7 @@ def remove_ctx(f: F) -> F:
|
||||||
This is used when a method signature has been updated to take 'ctx',
|
This is used when a method signature has been updated to take 'ctx',
|
||||||
but the overridden method in a subclass has not.
|
but the overridden method in a subclass has not.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def wrapper(self: Flask, *args: t.Any, **kwargs: t.Any) -> t.Any:
|
def wrapper(self: Flask, *args: t.Any, **kwargs: t.Any) -> t.Any:
|
||||||
if args and isinstance(args[0], AppContext):
|
if args and isinstance(args[0], AppContext):
|
||||||
args = args[1:]
|
args = args[1:]
|
||||||
|
|
@ -109,6 +110,7 @@ def add_ctx(f: F) -> F:
|
||||||
This is used when a method calls a super method that expects 'ctx',
|
This is used when a method calls a super method that expects 'ctx',
|
||||||
but the subclass method does not provide it.
|
but the subclass method does not provide it.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def wrapper(self: Flask, *args: t.Any, **kwargs: t.Any) -> t.Any:
|
def wrapper(self: Flask, *args: t.Any, **kwargs: t.Any) -> t.Any:
|
||||||
if not args:
|
if not args:
|
||||||
args = (app_ctx._get_current_object(),)
|
args = (app_ctx._get_current_object(),)
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ class Blueprint(SansioBlueprint):
|
||||||
|
|
||||||
See :doc:`/blueprints` for more information.
|
See :doc:`/blueprints` for more information.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
name: str,
|
name: str,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue