RF File's namedtuple to reflect 1-to-1 File's attributes (path, filename, dirname) #84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initially ran into the problem while trying to go through pybids's tutorial which would fail now since there is no .path in the "File" (tuple) provided to
get
callFile.path
stored as.path
of namedtuple, and then filename and dirname in corresponding fields as wellBoth changes are questionable (feel welcome to fix some other way) since I am not exactly sure on the "life span" of the namedtuple here and either other ways (make
File
hashable) for intended use (using as dict keys?) were considered... if it was intended to be used later to "reinstantiate"File
object, then it would fail since that one needs only "filename" which gets assigned to "path" (khe khe) and the other two are recomputed. Probably if that was intended, namedtuple would need to store also initial class.Obviously that this change does brake pybids, but the point is that there seems to be this inconsistency and pybids seems to be broken anyways already according to that example failures. With this change and master of grabbit I am getting "9 failed, 101 passed, 10 warnings, 1 error" in pybids (with 111 passed without).