Search for a given key in a NeoX yaml. normalizes underscores -> hyphens
(loaded_config, key, default=None)
| 58 | |
| 59 | |
| 60 | def get_key(loaded_config, key, default=None): |
| 61 | """ |
| 62 | Search for a given key in a NeoX yaml. normalizes underscores -> hyphens |
| 63 | """ |
| 64 | key = key.replace("_", "-") |
| 65 | try: |
| 66 | return loaded_config[key] |
| 67 | except KeyError: |
| 68 | key = key.replace("-", "_") |
| 69 | try: |
| 70 | return loaded_config[key] |
| 71 | except KeyError: |
| 72 | return default |
| 73 | |
| 74 | |
| 75 | def create_config(neox_config): |
no outgoing calls
no test coverage detected