U
    /v¶hˆ  ã                   @  s   d dl mZ G dd„ dƒZdS )é    )Úannotationsc                   @  sŠ   e Zd ZU dZdZded< dZded< dZded< dZded< dd	d
œdd„Z	ddœdd„Z
ddœdd„Zddœdd„Zddœdd„ZdS )Ú	UserAgentaô  Represents a parsed user agent header value.

    The default implementation does no parsing, only the :attr:`string`
    attribute is set. A subclass may parse the string to set the
    common attributes or expose other information. Set
    :attr:`werkzeug.wrappers.Request.user_agent_class` to use a
    subclass.

    :param string: The header value to parse.

    .. versionadded:: 2.0
        This replaces the previous ``useragents`` module, but does not
        provide a built-in parser.
    Nz
str | NoneÚplatformÚbrowserÚversionÚlanguageÚstrÚNone)ÚstringÚreturnc                 C  s
   || _ d S ©N©r
   )Úselfr
   © r   ú7/tmp/pip-unpacked-wheel-c3xdgso7/werkzeug/user_agent.pyÚ__init__    s    zUserAgent.__init__)r   c                 C  s"   dt | ƒj› d| j› d| j› d�S )Nú<ú ú/ú>)ÚtypeÚ__name__r   r   ©r   r   r   r   Ú__repr__$   s    zUserAgent.__repr__c                 C  s   | j S r   r   r   r   r   r   Ú__str__'   s    zUserAgent.__str__Úboolc                 C  s
   t | jƒS r   )r   r   r   r   r   r   Ú__bool__*   s    zUserAgent.__bool__c                 C  s   | j S )zConvert to a header value.r   r   r   r   r   Ú	to_header-   s    zUserAgent.to_header)r   Ú
__module__Ú__qualname__Ú__doc__r   Ú__annotations__r   r   r   r   r   r   r   r   r   r   r   r   r      s   
r   N)Ú
__future__r   r   r   r   r   r   Ú<module>   s   