Skip to content

Commit b8b39a1

Browse files
committed
extract subfunction
1 parent 48fecce commit b8b39a1

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
miss_hit==0.9.27
1+
miss_hit==0.9.33
22
pre-commit
33
jupyterlab
44
octave_kernel

src/Mapping.m

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ function print_mapping(obj, filename)
357357

358358
idx = strcmp(p.Results.prefix, available_mapped_prefixes);
359359

360-
end
360+
endclass
361361

362362
function obj = rm_mapping(obj, idx)
363363

@@ -367,20 +367,3 @@ function print_mapping(obj, filename)
367367

368368
end
369369
end
370-
371-
function bf = prepare_for_printing(spec)
372-
373-
if isfield(spec, 'suffix') && isempty(spec.suffix) || ...
374-
~isfield(spec, 'suffix')
375-
spec.suffix = '*';
376-
end
377-
378-
if isfield(spec, 'ext') && ~isempty(spec.ext)
379-
spec.extension = '.*';
380-
end
381-
if ~isfield(spec, 'extension') || isempty(spec.extension)
382-
spec.ext = '.*';
383-
end
384-
385-
bf = bids.File(spec);
386-
end

src/utils/prepare_for_printing.m

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
function bf = prepare_for_printing(spec)
2+
%
3+
% (C) Copyright 2022 spm_2_bids developers
4+
5+
if isfield(spec, 'suffix') && isempty(spec.suffix) || ...
6+
~isfield(spec, 'suffix')
7+
spec.suffix = '*';
8+
end
9+
10+
if isfield(spec, 'ext') && ~isempty(spec.ext)
11+
spec.extension = '.*';
12+
end
13+
if ~isfield(spec, 'extension') || isempty(spec.extension)
14+
spec.ext = '.*';
15+
end
16+
17+
bf = bids.File(spec);
18+
end

0 commit comments

Comments
 (0)