Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8dc5e2a

Browse files
committed
fix(traits): perfected trait recognition.
However, they are not listed as traits of the youtube api. What we really want is to list common implementation types as part of ourselves. This doesn't work though as long as we don't have the common impl as part of our sources.
1 parent c1eeee0 commit 8dc5e2a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/mako/lib/schema.mako

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ ${s.get('description', 'There is no detailed description.')}
3434
# Activities
3535
3636
This type is used in activities, which are methods you may call on this type or where this type is involved in.
37-
The list links the activity name, along with information about where it is used (one of ${util.put_and(util.IO_TYPES)}.
37+
The list links the activity name, along with information about where it is used (one of ${util.put_and(list('*%s*' % t
38+
for t in util.IO_TYPES))}).
3839
3940
${''.join("* %s (%s)\n" % (util.activity_split(a)[1], iot and '|'.join(iot) or 'none')
4041
for a, iot in c.sta_map[s.id].iteritems())}
4142
% else:
4243
43-
This schema type is not used in any activity, and only used as *part* of another schema.
44+
This type is not used in any activity, and only used as *part* of another schema.
4445
% endif
4546
</%def>

src/mako/lib/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def schema_markers(s, c):
149149
else:
150150
# it should have at least one activity that matches it's type to qualify for the Resource trait
151151
for fqan, iot in activities.iteritems():
152-
if activity_name_to_type_name(activity_split(fqan)[0]) == s.id:
152+
if activity_name_to_type_name(activity_split(fqan)[0]).lower() == s.id.lower():
153153
res.add('Resource')
154154
if IO_RESPONSE in iot:
155155
res.add('ResponseResult')

0 commit comments

Comments
 (0)