File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -95,15 +95,16 @@ module Py =
9595 /// as placeholders for the custom attribute's constructor arguments.</para>
9696 /// <para>Example - defining a custom decorator attribute:</para>
9797 /// <code>
98- /// [<Py.DecorateTemplate("app.get(\" {0}\" )")>]
98+ /// [<Erase; Py.DecorateTemplate("app.get(' {0}' )")>]
9999 /// type GetAttribute(path: string) = inherit Attribute()
100100 /// </code>
101101 /// <para>Example - using the custom decorator:</para>
102102 /// <code>
103103 /// [<Get("/users")>]
104104 /// static member get_users() = ...
105- /// // Generates: @app.get(" /users" )
105+ /// // Generates: @app.get(' /users' )
106106 /// </code>
107+ /// <para>Use [<Erase>] to prevent the attribute class from being emitted to Python.</para>
107108 /// </remarks>
108109 [<AttributeUsage( AttributeTargets.Class) >]
109110 type DecorateTemplateAttribute ( template : string ) =
Original file line number Diff line number Diff line change @@ -730,15 +730,15 @@ let app: obj = import "app" "./py/native_code.py"
730730
731731// Custom decorator attributes using DecorateTemplate
732732// Library authors define these once, users get clean syntax
733- [<Erase; Py.DecorateTemplate( " app.get(\" {0}\" )" ) >]
733+ [<Erase; Py.DecorateTemplate( " app.get(' {0}' )" ) >]
734734type GetAttribute ( path : string ) =
735735 inherit Attribute()
736736
737- [<Erase; Py.DecorateTemplate( " app.post(\" {0}\" )" ) >]
737+ [<Erase; Py.DecorateTemplate( " app.post(' {0}' )" ) >]
738738type PostAttribute ( path : string ) =
739739 inherit Attribute()
740740
741- [<Erase; Py.DecorateTemplate( " app.delete(\" {0}\" )" ) >]
741+ [<Erase; Py.DecorateTemplate( " app.delete(' {0}' )" ) >]
742742type DeleteAttribute ( path : string ) =
743743 inherit Attribute()
744744
You can’t perform that action at this time.
0 commit comments