Skip to content

Commit

Permalink
Use generic TSV file class from hed-validator package
Browse files Browse the repository at this point in the history
The previously used classes, BidsEventFile and BidsTabularFile, have
been deprecated. The parameter order is slightly different between
the respective constructors, so that has been tweaked.

Fixes bids-standard#1868
  • Loading branch information
happy5214 committed Feb 24, 2024
1 parent be4775c commit ddc23b3
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions bids-validator/validators/hed.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,12 @@ function constructTsvData(tsvFiles, jsonContents) {
potentialSidecars,
jsonContents,
)
let TsvFileClass
if (tsvFile.file.relativePath.endsWith('_events.tsv')) {
TsvFileClass = hedValidator.bids.BidsEventFile
} else {
TsvFileClass = hedValidator.bids.BidsTabularFile
}
return new TsvFileClass(
return new hedValidator.bids.BidsTsvFile(
tsvFile.path,
potentialSidecars,
mergedDictionary,
tsvFile.contents,
tsvFile.file,
potentialSidecars,
mergedDictionary,
)
})
}
Expand Down

0 comments on commit ddc23b3

Please sign in to comment.