You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.x has a standard data type for paths, pathlib.Path, but we are not using it. Specifying that has a configuration parameter has a data type of ni_measurementlink_service.DataType.Path yields a str, not a pathlib.Path.
Proposed Solution
Interpret ni_measurementlink_service.DataType.Path as pathlib.Path, possibly with a opt-in for compatibility.
We could use the same approach to get the path type:
# use str@measurement_service.configuration("levels_file_path", nims.DataType.Path, "PinLevels.digilevels")# use pathlib.Path@measurement_service.configuration("levels_file_path", nims.DataType.Path, pathlib.Path("PinLevels.digilevels"))
This approach would not work for path arrays when the default value is an empty list, because there is no 1st element from which to infer the element type. See #366
Problem to Solve
Python 3.x has a standard data type for paths,
pathlib.Path
, but we are not using it. Specifying that has a configuration parameter has a data type ofni_measurementlink_service.DataType.Path
yields astr
, not apathlib.Path
.Proposed Solution
Interpret
ni_measurementlink_service.DataType.Path
aspathlib.Path
, possibly with a opt-in for compatibility.AB#2414585
The text was updated successfully, but these errors were encountered: