Skip to content

Commit

Permalink
apply functools.wraps(fn) to preserve original func metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
TomeCirun committed Nov 24, 2023
1 parent 8ddc2e8 commit befce12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ckan/lib/maintain.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
''' This module contains code that helps in maintaining the Ckan codebase. '''
from __future__ import annotations

import functools
import inspect
import time
import logging
Expand Down Expand Up @@ -41,6 +42,7 @@ def decorator(fn: Callable[P, RT]) -> Callable[P, RT]:
'It must include the word `deprecated`.'
% (fn.__name__, fn.__module__))

@functools.wraps(fn)
def wrapped(*args: P.args, **kw: P.kwargs) -> RT:
since_msg = f'since CKAN v{since}' if since else ''
msg = (
Expand Down

0 comments on commit befce12

Please sign in to comment.