Skip to content

Commit

Permalink
do nothing when setting __wrapped__
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Feb 3, 2024
1 parent 3d1e177 commit 6cdfb49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion kpi/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def wrapper(fn, /):
self._last = None
if isinstance(fn, MiddleWare):
self._last = fn
fn = self._last.__wrapped__
fn = fn.__wrapped__
assert callable(fn)
self._fn = fn
return functools.wraps(fn)(self)
Expand All @@ -49,6 +49,10 @@ def wrapper(fn, /):
def __wrapped__(self):
return self._fn

@__wrapped__.setter
def __wrapped__(self, wrapped):
pass # no action

@property
def last(self):
return self._last
Expand Down
2 changes: 1 addition & 1 deletion mcdreforged.plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "kpi",
"version": "1.4.8",
"version": "1.4.9",
"name": "KPI",
"description": {
"en_us": "A MCDR plugins codes share library",
Expand Down

0 comments on commit 6cdfb49

Please sign in to comment.