Skip to content

Commit

Permalink
fix(traits): perfected trait recognition.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Byron committed Mar 3, 2015
1 parent c1eeee0 commit 8dc5e2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/mako/lib/schema.mako
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ ${s.get('description', 'There is no detailed description.')}
# Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in.
The list links the activity name, along with information about where it is used (one of ${util.put_and(util.IO_TYPES)}.
The list links the activity name, along with information about where it is used (one of ${util.put_and(list('*%s*' % t
for t in util.IO_TYPES))}).
${''.join("* %s (%s)\n" % (util.activity_split(a)[1], iot and '|'.join(iot) or 'none')
for a, iot in c.sta_map[s.id].iteritems())}
% else:
This schema type is not used in any activity, and only used as *part* of another schema.
This type is not used in any activity, and only used as *part* of another schema.
% endif
</%def>
2 changes: 1 addition & 1 deletion src/mako/lib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def schema_markers(s, c):
else:
# it should have at least one activity that matches it's type to qualify for the Resource trait
for fqan, iot in activities.iteritems():
if activity_name_to_type_name(activity_split(fqan)[0]) == s.id:
if activity_name_to_type_name(activity_split(fqan)[0]).lower() == s.id.lower():
res.add('Resource')
if IO_RESPONSE in iot:
res.add('ResponseResult')
Expand Down

0 comments on commit 8dc5e2a

Please sign in to comment.