From dfa2b71bc326883da38865aa8609509eaf70eff2 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Tue, 30 May 2023 14:03:03 +0000 Subject: [PATCH] config: trivial rename for better readability --- electrum/simple_config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/electrum/simple_config.py b/electrum/simple_config.py index d98b00b7d..4ebf37f72 100644 --- a/electrum/simple_config.py +++ b/electrum/simple_config.py @@ -816,7 +816,7 @@ class SimpleConfig(Logger): return self.decimal_point @cached_property - def cv(self): + def cv(config): """Allows getting a reference to a config variable without dereferencing it. Compare: @@ -826,11 +826,11 @@ class SimpleConfig(Logger): """ class CVLookupHelper: - def __getattribute__(self2, name: str) -> ConfigVarWithConfig: - config_var = self.__class__.__getattribute__(type(self), name) + def __getattribute__(self, name: str) -> ConfigVarWithConfig: + config_var = config.__class__.__getattribute__(type(config), name) if not isinstance(config_var, ConfigVar): raise AttributeError() - return ConfigVarWithConfig(config=self, config_var=config_var) + return ConfigVarWithConfig(config=config, config_var=config_var) def __setattr__(self, name, value): raise Exception( f"Cannot assign value to config.cv.{name} directly. "