Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
Make Artifact private
Browse files Browse the repository at this point in the history
  • Loading branch information
adelavega committed Dec 13, 2022
1 parent 48edd69 commit d4b97c8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bids/layout/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .utils import BIDSMetadata


class BIDSFile:
class BIDSFile(Artifact):
"""Represents a single file or directory in a BIDS dataset.
Parameters
Expand Down Expand Up @@ -43,16 +43,16 @@ def from_artifact(cls, artifact):

def __init__(self, artifact=None, filename=None):
if artifact is not None:
self.artifact = artifact
self._artifact = artifact
elif filename is not None:
self.artifact = Artifact(**parse_bids_name(filename))
self._artifact = Artifact(**parse_bids_name(filename))
else:
raise ValueError("Either artifact or filename must be provided")

@property
def path(self):
""" Convenience property for accessing path as a string."""
return self.artifact.name
return self._artifact.name

@property
def _path(self):
Expand Down Expand Up @@ -140,9 +140,9 @@ def get_entities(self, metadata=False, values='tags'):
A dict, where keys are entity names and values are Entity
instances.
"""
entities = self.artifact.get_entities()
entities = self._artifact.get_entities()
if metadata:
entities = {**entities, **self.artifact.get_metadata()}
entities = {**entities, **self._artifact.get_metadata()}

if values == 'object':
raise NotImplementedError
Expand Down

0 comments on commit d4b97c8

Please sign in to comment.