From 8dc5e2a53dbe4d620e97089e2af9e3a94a82a4a4 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 3 Mar 2015 09:37:23 +0100 Subject: [PATCH] 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. --- src/mako/lib/schema.mako | 5 +++-- src/mako/lib/util.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mako/lib/schema.mako b/src/mako/lib/schema.mako index 9c0ae36607..f4d913b2ed 100644 --- a/src/mako/lib/schema.mako +++ b/src/mako/lib/schema.mako @@ -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 \ No newline at end of file diff --git a/src/mako/lib/util.py b/src/mako/lib/util.py index fd01bd0b4f..cd59936f10 100644 --- a/src/mako/lib/util.py +++ b/src/mako/lib/util.py @@ -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')