File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,12 @@ The Python-specific directives are:
155155 * Default: ` false `
156156 * Allowed Values: ` true ` , ` false `
157157
158+ [ ` # gazelle:python_generate_pyi_srcs bool ` ] ( #python-generate-pyi-srcs )
159+ : Controls whether to generate a ` pyi_srcs ` attribute if a sibling ` .pyi ` file
160+ is found. When ` false ` (default), the ` pyi_srcs ` attribute is not added.
161+ * Default: ` false `
162+ * Allowed Values: ` true ` , ` false `
163+
158164[ ` # gazelle:python_generate_proto bool ` ] ( #python-generate-proto )
159165: Controls whether to generate a {bzl: obj }` py_proto_library ` for each
160166 {bzl: obj }` proto_library ` in the package. By default we load this rule from the
@@ -626,6 +632,28 @@ Detailed docs are not yet written.
626632:::
627633
628634
635+ ## ` python_generate_pyi_deps `
636+
637+ When ` true ` , include any sibling ` .pyi ` files in the ` pyi_srcs ` target attribute.
638+
639+ For example, assume you have the following files:
640+
641+ ```
642+ foo.py
643+ foo.pyi
644+ ```
645+
646+ The generated target will be:
647+
648+ ``` starlark
649+ py_library(
650+ name = " foo" ,
651+ srcs = [" foo.py" ],
652+ pyi_srcs = [" foo.pyi" ],
653+ )
654+ ```
655+
656+
629657## ` python_generate_proto `
630658
631659When ` # gazelle:python_generate_proto true ` , Gazelle will generate one
You can’t perform that action at this time.
0 commit comments