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
Currently, the from entity, not yet officially part of BIDS spec afaik but still found withing the derivatives config in pybids, overlaps with the python keyword from, as in from bids import BIDSLayout. As a result, the following cannot be run without a syntax error:
layout.get(from="space", to="other_space")
The convention for such cases is to add a trailing underscore to the reserved word (see PEP8), e.g. from_. I propose we allow the use of such underscored arguments in the .get method (and wherever else it's relevant).
This could be on a entity-by-entity basis, but as underscores in entity names are not valid or sensible in BIDS anyway, I think it would safe enough to just remove trailing underscores from every filter passed to bids. This would cover any future cases (e.g if class was ever made an entity).
The text was updated successfully, but these errors were encountered:
Currently, the
from
entity, not yet officially part of BIDS spec afaik but still found withing thederivatives
config in pybids, overlaps with the python keywordfrom
, as infrom bids import BIDSLayout
. As a result, the following cannot be run without a syntax error:The convention for such cases is to add a trailing underscore to the reserved word (see PEP8), e.g.
from_
. I propose we allow the use of such underscored arguments in the.get
method (and wherever else it's relevant).This could be on a entity-by-entity basis, but as underscores in entity names are not valid or sensible in BIDS anyway, I think it would safe enough to just remove trailing underscores from every filter passed to
bids
. This would cover any future cases (e.g ifclass
was ever made an entity).The text was updated successfully, but these errors were encountered: