提交 6a4d48bd authored 作者: Michael Osthege's avatar Michael Osthege 提交者: Brandon T. Willard

Use decorator syntax in `AesaraConfigWarning`

上级 55df19f0
......@@ -22,11 +22,10 @@ _logger = logging.getLogger("aesara.configparser")
class AesaraConfigWarning(Warning):
@classmethod
def warn(cls, message, stacklevel=0):
warnings.warn(message, cls, stacklevel=stacklevel + 3)
warn = classmethod(warn)
class ConfigAccessViolation(AttributeError):
""" Raised when a config setting is accessed through the wrong config instance. """
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论