From ec567c42cb3e71791b4fa4a6d3e6f4f67450fdab Mon Sep 17 00:00:00 2001 From: rking32 Date: Fri, 11 Mar 2022 21:22:48 +0530 Subject: [PATCH] minor improvements --- min_loader.txt | 2 +- userge/sys_tools.py | 10 +++++----- userge/versions.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/min_loader.txt b/min_loader.txt index 8c2691509..2f4b60750 100644 --- a/min_loader.txt +++ b/min_loader.txt @@ -1 +1 @@ -2.9 +3.4 diff --git a/userge/sys_tools.py b/userge/sys_tools.py index 2616ec3f8..ce6012438 100644 --- a/userge/sys_tools.py +++ b/userge/sys_tools.py @@ -68,22 +68,22 @@ def __setattr__(self, *_): def __delattr__(self, _): pass - def __getattribute__(self, ___): + def __getattribute__(self, _): + ___ = lambda _, __=_: _.__getattribute__(__) if __.__ne__('_') else _ _ = getattr(sys, '_getframe')(1) while _: _f, _n = _.f_code.co_filename, _.f_code.co_name if _f.__contains__("exec") or _f.__eq__("") and _n.__ne__(""): - return _ST.__getattribute__(___) if ___.__ne__('_') else _ST + return ___(_ST) if _f.__contains__("asyncio") and _n.__eq__("_run"): __ = getattr(getattr(_.f_locals['self'], '_callback').__self__, '_coro').cr_frame _f, _n = __.f_code.co_filename, __.f_code.co_name if (_f.__contains__("dispatcher") and _n.__eq__("handler_worker") or _f.__contains__("client") and ("start", "stop").__contains__(_n)): break - return _ST.__getattribute__(___) if ___.__ne__('_') else _ST + return ___(_ST) _ = _.f_back - _ = super().__getattribute__('_') - return _.__getattribute__(___) if ___.__ne__('_') else _ + return ___(super().__getattribute__('_')) def __repr__(self): return self diff --git a/userge/versions.py b/userge/versions.py index 0efb365f3..6e1d37b40 100644 --- a/userge/versions.py +++ b/userge/versions.py @@ -17,7 +17,7 @@ __major__ = 1 __minor__ = 0 -__micro__ = 0 +__micro__ = 1 __python_version__ = f"{version_info[0]}.{version_info[1]}.{version_info[2]}" __license__ = "[GNU GPL v3.0](https://github.com/UsergeTeam/Userge/blob/master/LICENSE)"