@@ -343,6 +343,10 @@ Detailed docs are not yet written.
343343(directive-python-proto-naming-convention)=
344344## ` python_proto_naming_convention `
345345
346+ :::{versionadded} 1.6.0
347+ {gh-pr}` 3093 `
348+ :::
349+
346350Set this directive to a string pattern to control how the generated
347351{bzl: obj }` py_proto_library ` targets are named. When generating new
348352{bzl: obj }` py_proto_library ` rules, Gazelle will replace ` $proto_name$ ` in the
@@ -393,6 +397,10 @@ Detailed docs are not yet written.
393397(directive-python-default-visibility)=
394398## ` python_default_visibility `
395399
400+ :::{versionadded} 0.32.0
401+ {gh-pr}` 1787 `
402+ :::
403+
396404Instructs gazelle to use these visibility labels on all _ python_ targets
397405(typically ` py_* ` , but can be modified via the ` map_kind ` directive). The arg
398406to this directive is a comma-separated list (without spaces) of labels.
@@ -469,6 +477,10 @@ These special values can be useful for sub-packages.
469477(directive-python-visibility)=
470478## ` python_visibility `
471479
480+ :::{versionadded} 0.32.0
481+ {gh-pr}` 1784 `
482+ :::
483+
472484Appends additional ` visibility ` labels to each generated target.
473485
474486This directive can be set multiple times. The generated ` visibility ` attribute
@@ -527,6 +539,10 @@ py_library(
527539(directive-python-test-file-pattern)=
528540## ` python_test_file_pattern `
529541
542+ :::{versionadded} 0.32.0
543+ {gh-pr}` 1819 `
544+ :::
545+
530546This directive adjusts which python files will be mapped to the {bzl: obj }` py_test ` rule.
531547
532548+ The default is ` *_test.py,test_*.py ` : both ` test_*.py ` and ` *_test.py ` files
@@ -590,6 +606,10 @@ py_library(
590606(directive-python-label-convention)=
591607## ` python_label_convention `
592608
609+ :::{versionadded} 0.34.0
610+ {gh-pr}` 1976 `
611+ :::
612+
593613:::{error}
594614Detailed docs are not yet written.
595615:::
@@ -598,6 +618,10 @@ Detailed docs are not yet written.
598618(directive-python-label-normalization)=
599619## ` python_label_normalization `
600620
621+ :::{versionadded} 0.34.0
622+ {gh-pr}` 1976 `
623+ :::
624+
601625:::{error}
602626Detailed docs are not yet written.
603627:::
@@ -653,6 +677,10 @@ that are relative to the current package.
653677(directive-python-generate-pyi-deps)=
654678## ` python_generate_pyi_deps `
655679
680+ :::{versionadded} 1.6.0
681+ {gh-pr}` 3014 `
682+ :::
683+
656684:::{error}
657685Detailed docs are not yet written.
658686:::
@@ -661,6 +689,10 @@ Detailed docs are not yet written.
661689(directive-python-generate-pyi-srcs)=
662690## ` python_generate_pyi_srcs `
663691
692+ :::{versionadded} 1.6.0
693+ {gh-pr}` 3356 `
694+ :::
695+
664696When ` true ` , include any sibling ` .pyi ` files in the ` pyi_srcs ` target attribute.
665697
666698For example, assume you have the following files:
@@ -684,6 +716,10 @@ py_library(
684716(directive-python-generate-proto)=
685717## ` python_generate_proto `
686718
719+ :::{versionadded} 1.6.0
720+ {gh-pr}` 3057 `
721+ :::
722+
687723When ` # gazelle:python_generate_proto true ` , Gazelle will generate one
688724{bzl: obj }` py_proto_library ` for each ` proto_library ` , generating Python clients for
689725protobuf in each package. By default this is turned off. Gazelle will also
@@ -746,13 +782,21 @@ previously-generated or hand-created rules.
746782(directive-python-resolve-sibling-imports)=
747783## ` python_resolve_sibling_imports `
748784
785+ :::{versionadded} 1.6.0
786+ {gh-pr}` 3106 `
787+ :::
788+
749789:::{error}
750790Detailed docs are not yet written.
751791:::
752792
753793(directive-python-include-ancestor-conftest)=
754794## ` python_include_ancestor_conftest `
755795
796+ :::{versionadded} 1.9.0
797+ {gh-pr}` 3596 `
798+ :::
799+
756800Version 1.9.0 includes a fix ({gh-pr}` 3498 ` ) for a long-standing issue
757801({gh-issue}` 3497 ` ) where ancestor ` conftest.py ` files were not automatically
758802added as dependencies of {bzl: obj }` py_test ` targets.
0 commit comments