From bff593d9e4299b8403c1f625946bc85f7d128f8f Mon Sep 17 00:00:00 2001 From: Oliver Bristow Date: Thu, 14 Sep 2017 21:19:36 +0100 Subject: [PATCH] replace shim wrap_method with staticmethod --- gunicorn/config.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gunicorn/config.py b/gunicorn/config.py index b1ca06a1..f5c7600b 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -31,12 +31,6 @@ KNOWN_SETTINGS = [] PLATFORM = sys.platform -def wrap_method(func): - def _wrapped(instance, *args, **kwargs): - return func(*args, **kwargs) - return _wrapped - - def make_settings(ignore=None): settings = {} ignore = ignore or () @@ -246,7 +240,7 @@ class SettingMeta(type): return super_new(cls, name, bases, attrs) attrs["order"] = len(KNOWN_SETTINGS) - attrs["validator"] = wrap_method(attrs["validator"]) + attrs["validator"] = staticmethod(attrs["validator"]) new_class = super_new(cls, name, bases, attrs) new_class.fmt_desc(attrs.get("desc", ""))