This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/main by this push:
new 65af7f8 Tidy up setting POST wrapper function attributes
65af7f8 is described below
commit 65af7f8e619d5e73542cf7ed1b574f5848f60ef7
Author: Sean B. Palmer <[email protected]>
AuthorDate: Sun Nov 9 10:24:09 2025 +0000
Tidy up setting POST wrapper function attributes
---
atr/blueprints/post.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/atr/blueprints/post.py b/atr/blueprints/post.py
index bee19da..1e1286d 100644
--- a/atr/blueprints/post.py
+++ b/atr/blueprints/post.py
@@ -120,6 +120,7 @@ def empty() -> Callable[[Callable[..., Awaitable[Any]]],
Callable[..., Awaitable
return quart.redirect(quart.request.path)
wrapper.__name__ = func.__name__
+ wrapper.__module__ = func.__module__
wrapper.__doc__ = func.__doc__
wrapper.__annotations__ = func.__annotations__.copy()
return wrapper
@@ -160,9 +161,10 @@ def form(
await quart.flash(json.dumps(flash_data),
category="form-error-data")
return quart.redirect(quart.request.path)
- wrapper.__name__ = func.__name__
- wrapper.__doc__ = func.__doc__
wrapper.__annotations__ = func.__annotations__.copy()
+ wrapper.__doc__ = func.__doc__
+ wrapper.__module__ = func.__module__
+ wrapper.__name__ = func.__name__
return wrapper
return decorator
@@ -176,9 +178,10 @@ def public(path: str) -> Callable[[Callable[...,
Awaitable[Any]]], web.RouteFunc
return await func(enhanced_session, *args, **kwargs)
endpoint = func.__module__.replace(".", "_") + "_" + func.__name__
- wrapper.__name__ = func.__name__
- wrapper.__doc__ = func.__doc__
wrapper.__annotations__["endpoint"] = _BLUEPRINT_NAME + "." + endpoint
+ wrapper.__doc__ = func.__doc__
+ wrapper.__module__ = func.__module__
+ wrapper.__name__ = func.__name__
_BLUEPRINT.add_url_rule(path, endpoint=endpoint, view_func=wrapper,
methods=["POST"])
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]