
    g                    0    d dl mZ d dlZdd	 	 	 	 	 ddZy)    )annotationsNF)strictc                  t        | t        j                        r| j                  }nj|sg| j                  r[t        | j                  t
              rAt        | j                  d   t        j                        r| j                  d   j                  }nyt        |t        j                        r=t        |j                  t              r#|j                  |j                  |j                  fS y)zExtract a docstring.

    Parameters:
        node: The node to extract the docstring from.
        strict: Whether to skip searching the body (functions).

    Returns:
        A tuple with the value and line numbers of the docstring.
    r   )NNN)

isinstanceastExprvaluebodylistConstantstrlineno
end_lineno)noder   docs      T/var/www/openai/venv/lib/python3.12/site-packages/_griffe/agents/nodes/docstrings.pyget_docstringr      s     $!jj		jD&AjQUQZQZ[\Q]_b_g_gFhiil  #s||$CIIs)Cyy#**cnn44    )r   zast.ASTr   boolreturnz)tuple[str | None, int | None, int | None])
__future__r   r   r    r   r   <module>r      s3    # 
 
  /	r   