Skip to content

Commit b699bcd

Browse files
Updated indentation and variable name
1 parent fada700 commit b699bcd

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@
16681668
#### [nirfsg] Unreleased
16691669
- Added
16701670
- Enabled selected public APIs
1671-
- Enabled custom object expansion for repeated capability
1671+
- Enabled custom object expansion for repeated capabilities
16721672
- Basic example
16731673
- Documentation for APIs (not final)
16741674
- Changed

build/templates/session.py.mako

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class _Lock(object):
9191

9292
% endif
9393
% if len(config['repeated_capabilities']) > 0:
94-
% if config['repeated_capability_object_type']['python'] == 'custom':
94+
% if config['repeated_capability_object_type']['python'] == 'applicable-attributes-only':
9595
% for rep_cap in config['repeated_capabilities']:
9696

9797
class _RepeatedCapability${rep_cap['python_name'].capitalize()}(object):
@@ -215,10 +215,10 @@ class _SessionBase(object):
215215

216216
% for attribute in helper.sorted_attrs(helper.filter_codegen_attributes(attributes)):
217217
<%
218-
# Skip attributes with repeated capability expansion set to "custom"
218+
# Skip attributes with repeated capability expansion set to "applicable-attributes-only"
219219
if 'repeated_capability_type' in attributes[attribute]:
220220
rep_cap_type = attributes[attribute]['repeated_capability_type']
221-
if any(rep_cap.get('python_name') == rep_cap_type and config['repeated_capability_object_type'] == 'custom' for rep_cap in config['repeated_capabilities']):
221+
if any(rep_cap.get('python_name') == rep_cap_type and config['repeated_capability_object_type'] == 'applicable-attributes-only' for rep_cap in config['repeated_capabilities']):
222222
continue
223223
helper.add_attribute_rep_cap_tip(attributes[attribute], config)
224224
%>\
@@ -261,13 +261,13 @@ constructor_params = helper.filter_parameters(init_function['parameters'], helpe
261261

262262
% if len(config['repeated_capabilities']) > 0:
263263
# Instantiate any repeated capability objects
264-
% for rep_cap in config['repeated_capabilities']:
265-
% if config['repeated_capability_object_type']['python'] == 'custom':
264+
% for rep_cap in config['repeated_capabilities']:
265+
% if config['repeated_capability_object_type']['python'] == 'applicable-attributes-only':
266266
self.${rep_cap['python_name']} = _RepeatedCapability${rep_cap['python_name'].capitalize()}(self, repeated_capability_list)
267-
% else:
267+
% else:
268268
self.${rep_cap['python_name']} = _RepeatedCapabilities(self, '${rep_cap["prefix"]}', repeated_capability_list)
269-
% endif
270-
% endfor
269+
% endif
270+
% endfor
271271

272272
% endif
273273
# Finally, set _is_frozen to True which is used to prevent clients from accidentally adding

src/nirfsg/metadata/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
},
4141
'module_name': 'nirfsg',
4242
'repeated_capability_object_type': {
43-
'python': 'custom'
43+
'python': 'applicable-attributes-only'
4444
},
4545
'repeated_capabilities': [
4646
{

0 commit comments

Comments
 (0)