mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-04 11:30:57 +08:00
Simplify meta class
This commit is contained in:
@@ -13,11 +13,10 @@ from .config import C
|
||||
|
||||
|
||||
class MetaLogger(type):
|
||||
|
||||
def __new__(cls, name, bases, dict):
|
||||
wrapper_dict = type(logging.getLogger("MetaLogger")).__dict__.copy()
|
||||
wrapper_dict = logging.Logger.__dict__.copy()
|
||||
wrapper_dict.update(dict)
|
||||
wrapper_dict["__doc__"] = logging.getLogger("MetaLogger").__doc__
|
||||
wrapper_dict["__doc__"] = logging.Logger.__doc__
|
||||
return type.__new__(cls, name, bases, wrapper_dict)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user