tiqi-group / pydase

A Python library for creating remote control interfaces of Python objects.
https://pydase.readthedocs.io
MIT License
1 stars 1 forks source link

Fix: normalize full access path (for dict keys) #162

Closed mosmuell closed 1 week ago

mosmuell commented 1 week ago

Encoding a dictionary key in a full access path is usually done with single quotes, i.e. when accessing a dictionary key, the full access path will look like "my_dict['my_key'].some_attribute". When changing some_attr through the frontend, the key will be encoded in double quotes: 'my_dict["my_key"].some_attribute'. Thus, I have to perform some normalization.

This PR adds normalization to the DataServiceObserver, transforming double quotes into single quotes before comparing to the property_deps_dict. (This is the dictionary containing the dependencies of properties -> needed to have automatic updates for python properties objects when their dependencies change.)