File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import logging
44import textwrap
55from dataclasses import dataclass , field
6+ from functools import cached_property
67from pathlib import Path
78
89import click
@@ -343,7 +344,7 @@ def _doctype_to_annotation(self, doctype):
343344 )
344345 return ErrorFallbackAnnotation
345346
346- @property
347+ @cached_property
347348 def parameters (self ) -> dict [str , Annotation ]:
348349 def name_and_type (numpydoc_section ):
349350 name_type = {
@@ -366,7 +367,7 @@ def name_and_type(numpydoc_section):
366367 }
367368 return annotations
368369
369- @property
370+ @cached_property
370371 def returns (self ) -> Annotation | None :
371372 out = [
372373 self ._doctype_to_annotation (param .type )
@@ -376,7 +377,7 @@ def returns(self) -> Annotation | None:
376377 out = Annotation .as_return_tuple (out ) if out else None
377378 return out
378379
379- @property
380+ @cached_property
380381 def yields (self ) -> Annotation | None :
381382 out = {
382383 self ._doctype_to_annotation (param .type )
You can’t perform that action at this time.
0 commit comments