diff options
author | 2017-12-14 12:28:56 -0500 | |
---|---|---|
committer | 2017-12-14 12:38:47 -0500 | |
commit | 81a4948b88986359293c78d789dcbdd714caeab1 (patch) | |
tree | 4f00a4bf79fa353f56cc84a0a5e1c6abbc63a0d6 /src/main/java/com/google/devtools/build/lib/analysis | |
parent | ab97d786e9400b70c4513d5b5635fa676487cacf (diff) |
Clarify types of `ctx.attr.<attr_name>` objects.
PiperOrigin-RevId: 179053724
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleContext.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleContext.java index c80c7c1848..20bb7b895a 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleContext.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleContext.java @@ -137,7 +137,9 @@ public final class SkylarkRuleContext implements SkylarkValue { + "<pre class=language-python>list(ctx.attr.<ATTR>.files)[0]</pre>"; public static final String ATTR_DOC = "A struct to access the values of the attributes. The values are provided by " - + "the user (if not, a default value is used)."; + + "the user (if not, a default value is used). The attributes of the struct and the " + + "types of their values correspond to the keys and values of the <code>attrs</code> " + + "dict provided to the <code>rule</code> function."; public static final String SPLIT_ATTR_DOC = "A struct to access the values of attributes with split configurations. If the attribute is " + "a label list, the value of split_attr is a dict of the keys of the split (as strings) " |