mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-06 13:30:41 +02:00
removes helper function normalize_full_access_path_string
This commit is contained in:
parent
4f206bbae9
commit
53a2a3303f
@ -223,25 +223,3 @@ def current_event_loop_exists() -> bool:
|
|||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
return asyncio.get_event_loop_policy()._local._loop is not None # type: ignore
|
return asyncio.get_event_loop_policy()._local._loop is not None # type: ignore
|
||||||
|
|
||||||
|
|
||||||
def normalize_full_access_path_string(s: str) -> str:
|
|
||||||
"""Normalizes a string representing a full access path by converting double quotes
|
|
||||||
to single quotes.
|
|
||||||
|
|
||||||
This function is useful for ensuring consistency in strings that represent access
|
|
||||||
paths containing dictionary keys, by replacing all double quotes (`"`) with single
|
|
||||||
quotes (`'`).
|
|
||||||
|
|
||||||
Args:
|
|
||||||
s (str): The input string to be normalized.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
A new string with all double quotes replaced by single quotes.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
>>> normalize_full_access_path_string('dictionary["first"].my_task')
|
|
||||||
"dictionary['first'].my_task"
|
|
||||||
"""
|
|
||||||
|
|
||||||
return s.replace('"', "'")
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user