(variables: Iterable[Hashable])
| 216 | |
| 217 | |
| 218 | def _check_for_slashes_in_names(variables: Iterable[Hashable]) -> None: |
| 219 | offending_variable_names = [ |
| 220 | name for name in variables if isinstance(name, str) and "/" in name |
| 221 | ] |
| 222 | if len(offending_variable_names) > 0: |
| 223 | raise ValueError( |
| 224 | "Given variables have names containing the '/' character: " |
| 225 | f"{offending_variable_names}. " |
| 226 | "Variables stored in DataTree objects cannot have names containing '/' characters, as this would make path-like access to variables ambiguous." |
| 227 | ) |
| 228 | |
| 229 | |
| 230 | class DatasetView(Dataset): |
no outgoing calls
no test coverage detected
searching dependent graphs…