U
    sVc8                     @  s   d dl mZ d dlZd dlZd dlmZ d dlZd dlm	Z	m
Z
 ejddd d dlZd dlmZ e
G d	d
 d
e	ZG dd deZdd ZdS )    )annotationsN)type_t)ExtensionDtyperegister_extension_dtypepyarrowz1.0.1)Z
minversion)ArrowExtensionArrayc                   @  s2   e Zd ZejZdZdZejZ	e
ddddZdS )ArrowTimestampUSDtypeMZarrow_timestamp_usztype_t[ArrowTimestampUSArray]returnc                 C  s   t S )zq
        Return the array type associated with this dtype.

        Returns
        -------
        type
        )ArrowTimestampUSArray)cls r   O/tmp/pip-unpacked-wheel-xj8nt62q/pandas/tests/extension/arrow/test_timestamp.pyconstruct_array_type   s    	z*ArrowTimestampUSDtype.construct_array_typeN)__name__
__module____qualname__datetimetypekindnamepaZNULLZna_valueclassmethodr   r   r   r   r   r      s   r   c                   @  s   e Zd ZddddZdS )r   Noner
   c                 C  s6   t |tjst|jtdks$t|| _t | _	d S )Nus)

isinstancer   ZChunkedArray
ValueErrorr   	timestampAssertionError_datar   Z_dtype)selfvaluesr   r   r   __init__+   s
    zArrowTimestampUSArray.__init__N)r   r   r   r#   r   r   r   r   r   *   s   r   c                  C  s2   t d tdddddddg} td| i d S )	Ni  	                  r   )r   Z_from_sequencer   pdZ	DataFrame)Zarrr   r   r   test_constructor_extensionblock4   s    r+   )
__future__r   r   ZpytestZpandas._typingr   Zpandasr*   Zpandas.api.extensionsr   r   Zimportorskipr   r   Z#pandas.tests.extension.arrow.arraysr   r   r   r+   r   r   r   r   <module>   s   
