File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -816,7 +816,7 @@ def get_decimal_point(self):
816
816
return self .decimal_point
817
817
818
818
@cached_property
819
- def cv (self ):
819
+ def cv (config ):
820
820
"""Allows getting a reference to a config variable without dereferencing it.
821
821
822
822
Compare:
@@ -826,11 +826,11 @@ def cv(self):
826
826
<ConfigVarWithConfig key='server'>
827
827
"""
828
828
class CVLookupHelper :
829
- def __getattribute__ (self2 , name : str ) -> ConfigVarWithConfig :
830
- config_var = self .__class__ .__getattribute__ (type (self ), name )
829
+ def __getattribute__ (self , name : str ) -> ConfigVarWithConfig :
830
+ config_var = config .__class__ .__getattribute__ (type (config ), name )
831
831
if not isinstance (config_var , ConfigVar ):
832
832
raise AttributeError ()
833
- return ConfigVarWithConfig (config = self , config_var = config_var )
833
+ return ConfigVarWithConfig (config = config , config_var = config_var )
834
834
def __setattr__ (self , name , value ):
835
835
raise Exception (
836
836
f"Cannot assign value to config.cv.{ name } directly. "
You can’t perform that action at this time.
0 commit comments