Skip to content

Commit 388009f

Browse files
committed
removing tuples from checks
1 parent 57d09ea commit 388009f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/checkspecs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,10 @@ def test_specs(self, uri):
273273
bad_specs.append(
274274
[uri, c, 'Inputs', traitname, 'mandatory=False'])
275275
# checking if traits that have default_value different that the trits default one
276-
# also have `usedefault` specified; excluding Enum, since it always has default value
277-
if trait.trait_type.__class__.__name__ != "Enum"\
276+
# also have `usedefault` specified;
277+
# excluding Enum: always has default value (the first value)
278+
# excluding Tuple: takes tuple of inner traits default values as default, but doesn't use it
279+
if trait.trait_type.__class__.__name__ not in ["Tuple", "Enum"]\
278280
and trait.default and "usedefault" not in trait.__dict__:
279281
bad_specs.append(
280282
[uri, c, 'Inputs', traitname, 'default value is set, no value for usedefault'])

0 commit comments

Comments
 (0)