Hi,
@dataclass
class Test:
my_var: str
dataconf.env("").on(Test)
The above will fail in the environment contains a key of the format xxx_{int}=... i.e. a string, an underscore and a number that can be parsed as an int.
This line then considers p[1] to be an int, but focus does not contain the key p[0] at all and we get a Key error.
For example, my env contains 'EFC_5748': '1'. The above line is executed with these values:
p = ['efc', 5748]
focus = ret
focus does not contain the key efc
Hi,
The above will fail in the environment contains a key of the format
xxx_{int}=...i.e. a string, an underscore and a number that can be parsed as an int.This line then considers
p[1]to be an int, butfocusdoes not contain the keyp[0]at all and we get a Key error.For example, my env contains
'EFC_5748': '1'. The above line is executed with these values:p = ['efc', 5748]focus = retfocusdoes not contain the keyefc