@@ -79,21 +79,23 @@ def ls(self, template, **kwargs):
7979
8080 Examples
8181 --------
82- >>> ls('MNI152Lin', resolution=1, suffix='T1w', desc=None) # doctest: +ELLIPSIS
82+ >>> client = TemplateFlowClient()
83+
84+ >>> client.ls('MNI152Lin', resolution=1, suffix='T1w', desc=None) # doctest: +ELLIPSIS
8385 [PosixPath('.../tpl-MNI152Lin/tpl-MNI152Lin_res-01_T1w.nii.gz')]
8486
85- >>> ls('MNI152Lin', resolution=2, suffix='T1w', desc=None) # doctest: +ELLIPSIS
87+ >>> client. ls('MNI152Lin', resolution=2, suffix='T1w', desc=None) # doctest: +ELLIPSIS
8688 [PosixPath('.../tpl-MNI152Lin/tpl-MNI152Lin_res-02_T1w.nii.gz')]
8789
88- >>> ls('MNI152Lin', suffix='T1w', desc=None) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
90+ >>> client. ls('MNI152Lin', suffix='T1w', desc=None) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
8991 [PosixPath('.../tpl-MNI152Lin/tpl-MNI152Lin_res-01_T1w.nii.gz'),
9092 PosixPath('.../tpl-MNI152Lin/tpl-MNI152Lin_res-02_T1w.nii.gz')]
9193
92- >>> ls('fsLR', space=None, hemi='L',
93- ... density='32k', suffix='sphere') # doctest: +ELLIPSIS
94+ >>> client. ls('fsLR', space=None, hemi='L',
95+ ... density='32k', suffix='sphere') # doctest: +ELLIPSIS
9496 [PosixPath('.../tpl-fsLR_hemi-L_den-32k_sphere.surf.gii')]
9597
96- >>> ls('fsLR', space='madeup')
98+ >>> client. ls('fsLR', space='madeup')
9799 []
98100
99101 """
@@ -138,25 +140,27 @@ def get(self, template, raise_empty=False, **kwargs):
138140
139141 Examples
140142 --------
141- >>> str(get('MNI152Lin', resolution=1, suffix='T1w', desc=None)) # doctest: +ELLIPSIS
143+ >>> client = TemplateFlowClient()
144+
145+ >>> str(client.get('MNI152Lin', resolution=1, suffix='T1w', desc=None)) # doctest: +ELLIPSIS
142146 '.../tpl-MNI152Lin/tpl-MNI152Lin_res-01_T1w.nii.gz'
143147
144- >>> str(get('MNI152Lin', resolution=2, suffix='T1w', desc=None)) # doctest: +ELLIPSIS
148+ >>> str(client. get('MNI152Lin', resolution=2, suffix='T1w', desc=None)) # doctest: +ELLIPSIS
145149 '.../tpl-MNI152Lin/tpl-MNI152Lin_res-02_T1w.nii.gz'
146150
147- >>> [str(p) for p in get(
151+ >>> [str(p) for p in client. get(
148152 ... 'MNI152Lin', suffix='T1w', desc=None)] # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
149153 ['.../tpl-MNI152Lin/tpl-MNI152Lin_res-01_T1w.nii.gz',
150154 '.../tpl-MNI152Lin/tpl-MNI152Lin_res-02_T1w.nii.gz']
151155
152- >>> str(get('fsLR', space=None, hemi='L',
156+ >>> str(client. get('fsLR', space=None, hemi='L',
153157 ... density='32k', suffix='sphere')) # doctest: +ELLIPSIS
154158 '.../tpl-fsLR_hemi-L_den-32k_sphere.surf.gii'
155159
156- >>> get('fsLR', space='madeup')
160+ >>> client. get('fsLR', space='madeup')
157161 []
158162
159- >>> get('fsLR', raise_empty=True, space='madeup') # doctest: +IGNORE_EXCEPTION_DETAIL
163+ >>> client. get('fsLR', raise_empty=True, space='madeup') # doctest: +IGNORE_EXCEPTION_DETAIL
160164 Traceback (most recent call last):
161165 Exception:
162166 ...
@@ -218,7 +222,9 @@ def get_metadata(self, template):
218222
219223 Examples
220224 --------
221- >>> get_metadata('MNI152Lin')['Name']
225+ >>> client = TemplateFlowClient()
226+
227+ >>> client.get_metadata('MNI152Lin')['Name']
222228 'Linear ICBM Average Brain (ICBM152) Stereotaxic Registration Model'
223229
224230 """
0 commit comments