Skip to content

Commit cd16436

Browse files
chkossricwo
andauthored
Apply suggestions from code review
Co-Authored-By: ricwo <[email protected]>
1 parent b38704f commit cd16436

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rasa/core/domain.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ def _transform_intent_properties_for_internal_use(
306306
)
307307

308308
properties[USED_ENTITIES_KEY] = used_entities
309-
properties.pop(USE_ENTITIES_KEY)
310-
properties.pop(IGNORE_ENTITIES_KEY)
309+
del properties[USE_ENTITIES_KEY]
310+
del properties[IGNORE_ENTITIES_KEY]
311311

312312
return intent
313313

@@ -331,6 +331,7 @@ def collect_intent_properties(
331331
intent = cls._transform_intent_properties_for_internal_use(intent, entities)
332332

333333
intent_properties.update(intent)
334+
334335
return intent_properties
335336

336337
@staticmethod
@@ -795,7 +796,7 @@ def cleaned_domain(self) -> Dict[Text, Any]:
795796
for idx, intent_info in enumerate(domain_data["intents"]):
796797
for name, intent in intent_info.items():
797798
if intent.get(USE_ENTITIES_KEY) is True:
798-
intent.pop(USE_ENTITIES_KEY)
799+
del intent[USE_ENTITIES_KEY]
799800
if not intent.get(IGNORE_ENTITIES_KEY):
800801
intent.pop(IGNORE_ENTITIES_KEY, None)
801802
if len(intent) == 0:

0 commit comments

Comments
 (0)