Note: The default ITS GitLab runner is a shared resource and is subject to slowdowns during heavy usage.
You can run your own GitLab runner that is dedicated just to your group if you need to avoid processing delays.

Commit 21522fc4 authored by Camilla Dodge Koslowsky Harris's avatar Camilla Dodge Koslowsky Harris
Browse files

Made bracketify function more complete

parent 0a875c51
......@@ -260,6 +260,10 @@ def bracketify(variable_name: str) -> str:
This is helpful for accessing Tecplot variables.
variable_name (str): A string which may contain the meta-characters * ?
[ or ].
In a dataset which contains the variable 'X [R]',
......@@ -273,7 +277,13 @@ def bracketify(variable_name: str) -> str:
```print(dataset.variable(tpt.bracketify('X [R]')).name)```
will succeed.
return variable_name.translate(str.maketrans({'[':'[[]', ']':'[]]'}))
translation = {
return variable_name.translate(str.maketrans(translation))
def write_zone(
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment