File: //opt/saltstack/salt/lib/python3.10/site-packages/annotated_doc/__pycache__/main.cpython-310.pyc
o
;j3 � @ s G d d� d�Z dS )c @ sP e Zd ZdZdeddfdd�Zdefdd�Zdefd d
�Zde de
fdd
�ZdS )�Docat Define the documentation of a type annotation using `Annotated`, to be
used in class attributes, function and method parameters, return values,
and variables.
The value should be a positional-only string literal to allow static tools
like editors and documentation generators to use it.
This complements docstrings.
The string value passed is available in the attribute `documentation`.
Example:
```Python
from typing import Annotated
from annotated_doc import Doc
def hi(name: Annotated[str, Doc("Who to say hi to")]) -> None:
print(f"Hi, {name}!")
```
�
documentation�returnNc C s
|| _ d S �N�r )�selfr � r �F/opt/saltstack/salt/lib/python3.10/site-packages/annotated_doc/main.py�__init__ �
zDoc.__init__c C s d| j �d�S )NzDoc(�)r �r r r r �__repr__ s zDoc.__repr__c C s
t | j�S r )�hashr r r r r �__hash__ r
zDoc.__hash__�otherc C s t |t�stS | j|jkS r )�
isinstancer �NotImplementedr )r r r r r �__eq__! s
z
Doc.__eq__)�__name__�
__module__�__qualname__�__doc__�strr r
�intr �object�boolr r r r r r s r N)r r r r r �<module> s