@@ -79,6 +79,8 @@ def render_package(self, item: ItemData) -> t.Iterable[str]:
7979 yield ""
8080
8181 yield f"```{{py:module}} { full_name } "
82+ if self .no_index (item ):
83+ yield ":noindex:"
8284 if self .is_module_deprecated (item ):
8385 yield ":deprecated:"
8486 yield from ["```" , "" ]
@@ -184,6 +186,8 @@ def render_function(self, item: ItemData) -> t.Iterable[str]:
184186
185187 yield f"{ backticks } {{py:function}} { sig } "
186188 yield f":canonical: { item ['full_name' ]} "
189+ if self .no_index (item ):
190+ yield ":noindex:"
187191 # TODO overloads
188192 if "async" in item .get ("properties" , []):
189193 yield ":async:"
@@ -217,12 +221,10 @@ def render_class(self, item: ItemData) -> t.Iterable[str]:
217221 # note, here we can cannot yield by line,
218222 # because we need to look ahead to know the length of the backticks
219223
220- lines : list [str ] = []
221-
222- lines += [
223- f":canonical: { item ['full_name' ]} " ,
224- "" ,
225- ]
224+ lines : list [str ] = [f":canonical: { item ['full_name' ]} " ]
225+ if self .no_index (item ):
226+ lines += [":noindex:" ]
227+ lines += ["" ]
226228
227229 # TODO overloads
228230
@@ -276,6 +278,8 @@ def render_property(self, item: ItemData) -> t.Iterable[str]:
276278 short_name = item ["full_name" ].split ("." )[- 1 ]
277279 yield f"{ backticks } {{py:property}} { short_name } "
278280 yield f":canonical: { item ['full_name' ]} "
281+ if self .no_index (item ):
282+ yield ":noindex:"
279283 for prop in ("abstractmethod" , "classmethod" ):
280284 if prop in item .get ("properties" , []):
281285 yield f":{ prop } :"
@@ -305,6 +309,8 @@ def render_method(self, item: ItemData) -> t.Iterable[str]:
305309
306310 yield f"{ backticks } {{py:method}} { sig } "
307311 yield f":canonical: { item ['full_name' ]} "
312+ if self .no_index (item ):
313+ yield ":noindex:"
308314 # TODO overloads
309315 # TODO collect final decorated in analysis
310316 for prop in ("abstractmethod" , "async" , "classmethod" , "final" , "staticmethod" ):
@@ -333,6 +339,8 @@ def render_data(self, item: ItemData) -> t.Iterable[str]:
333339
334340 yield f"{ backticks } {{py:{ item ['type' ]} }} { short_name } "
335341 yield f":canonical: { item ['full_name' ]} "
342+ if self .no_index (item ):
343+ yield ":noindex:"
336344 for prop in ("abstractmethod" , "classmethod" ):
337345 if prop in item .get ("properties" , []):
338346 yield f":{ prop } :"
0 commit comments