minor code fix: remove duplicate hash calculation and fix typo

pull/22536/head
neatguycoding 10 months ago
parent 7068fae9d4
commit 31a3db0c60
No known key found for this signature in database
GPG Key ID: 986432EB84C921B3

@ -152,7 +152,6 @@ class VariablePool(BaseModel):
self.variable_dictionary[selector[0]] = {}
return
key, hash_key = self._selector_to_keys(selector)
hash_key = hash(tuple(selector[1:]))
self.variable_dictionary[key].pop(hash_key, None)
def convert_template(self, template: str, /):

@ -376,7 +376,7 @@ class TestSegmentDumpAndLoad:
f"get_segment_discriminator failed for serialized form of type {type(variable)}"
)
def test_invlaid_value_for_discriminator(self):
def test_invalid_value_for_discriminator(self):
# Test invalid cases
assert get_segment_discriminator({"value_type": "invalid"}) is None
assert get_segment_discriminator({}) is None

Loading…
Cancel
Save