Skip to main content
Glama

ClickUp Operator

by noah-vh
gui.cpython-312.pyc21.6 kB
� lMg�6����ddlZddlZddlZddlZddlZddlmZmZddlZ ddl m Z m Z m Z ddlmZe j �ej"d�ZGd�d�ZGd �d e�ZGd �d e�Zy) �N)�ClassVar�Sequence�)�OpenFile�get_filesystem_class�split_protocol)�known_implementationsz fsspec.guic��eZdZUdZgZeeeed<gZ eeeed<d�Z d�Z de jdfd�Zd �Zd �Zd �Zej&d ��Zdd�Zdd�Zy )�SigSlota�Signal-slot mixin, for Panel event passing Include this class in a widget manager's superclasses to be able to register events and callbacks on Panel widgets managed by that class. The method ``_register`` should be called as widgets are added, and external code should call ``connect`` to associate callbacks. By default, all signals emit a DEBUG logging statement. �signals�slotsc�N�d|_i|_i|_|j�y)NF)�_ignoring_events�_sigs�_map�_setup��selfs �VC:\Users\noahv\Documents\GitHub\clickup-operator\.venv\Lib\site-packages\fsspec/gui.py�__init__zSigSlot.__init__%s!�� %����� ��� � � � � �c�J�tjj�|_y)z(Create GUI elements and register signalsN)�pn�pane�PaneBase�panelrs rrzSigSlot._setup+s���W�W�%�%�'�� r�valueFc ��||jvrtd|����|g||d�|j|<dj|�t |dt |��nd|g�}||j |<|�(|jj|j|d��|r*t||�r|j|t ||��yyy) a�Watch the given attribute of a widget and assign it a named event This is normally called at the time a widget is instantiated, in the class which owns it. Parameters ---------- widget : pn.layout.Panel or None Widget to watch. If None, an anonymous signal not associated with any widget. name : str Name of this event thing : str Attribute of the given widget to watch log_level : int When the signal is triggered, a logging event of the given level will be fired in the dfviz logger. auto : bool If True, automatically connects with a method in this class of the same name. z(Attempt to assign an undeclared signal: )�widget� callbacks�thing�log�-N�name�noneT)� onlychanged) r � ValueErrorr�join�getattr�strr�param�watch�_signal�hasattr�connect)rrr$r!� log_level�auto�wns r� _registerzSigSlot._register0s���0 �t�|�|� #��G��v�N�O� O�����  �� � �4�� �X�X�8>�8J�����F� �4�PV�� � �� �� � �"� � � � �L�L� � �t�|�|�U�� � E� �G�D�$�'� �L�L��w�t�T�2� 3�(�4rc�� |jj|i|��S#ttf$r}t d�|�d}~wwxYw)z!Display in a notebook or a serverz)Panel does not seem to be set up properlyN)r�_repr_mimebundle_r'�AttributeError�NotImplementedError)r�args�kwargs�excs rr5zSigSlot._repr_mimebundle_\sK�� �/�4�:�:�/�/��@��@� @���N�+� �%�;��� �� �s��>� 9�>c�F�|j|dj|�y)a�Associate call back with given event The callback must be a function which takes the "new" value of the watched attribute as the only parameter. If the callback return False, this cancels any further processing of the given event. Alternatively, the callback can be a string, in which case it means emitting the correspondingly-named event (i.e., connect to self) r N)r�append)r�signal�slots rr/zSigSlot.connectes �� � � �6��;�'�.�.�t�4rc�(�|js�dj|jj|jg�}||jvrF|j||j vr*|j |j||j�yyyy)z�This is called by a an action on a widget Within an self.ignore_events context, nothing happens. Tests can execute this method by directly changing the values of widget components. r#N)rr(�objr$rr�_emit�new)r�eventr2s rr-zSigSlot._signalqsp���$�$����5�9�9�>�>�5�:�:�6�7�B��T�Y�Y��4�9�9�R�=�D�J�J�#>�� � �4�9�9�R�=�%�)�)�4�$?��%rc#�JK�d|_ d��d|_y#d|_wxYw�w)zjTemporarily turn off events processing in this instance (does not propagate to children) TNF)rrs r� ignore_eventszSigSlot.ignore_events~s(���� !%��� *� �$)�D� !��E�D� !�s�#��#� �#Nc�D�tj|j|d|�d|���|j|dD]3}t|t�r|j |��% ||�}|dury�5y#t $r!}tjd||�Yd}~�\d}~wwxYw)z�An event happened, call its callbacks This method can be used in tests to simulate message passing without directly changing visual elements. Calling of callbacks will halt whenever one returns False. r"z: r Fz6Exception (%s) while executing callback for signal: %sN)�loggerr"r� isinstancer*rA� Exception� exception)r�sigr�callback�ret�es rrAz SigSlot._emit�s��� � � �4�:�:�c�?�5�)�c�U�"�U�G�+<�=�� � �3�� �4�H��(�C�(�� � �8�$� �"�5�/�C��e�|��$�5��!���$�$�P�������s�$ A5�5 B�>B�Bc�@�|jj|d��|S)z<Open a new browser tab and display this instance's interfaceF)�threads�verbose)r�show)rrPs rrRz SigSlot.show�s�� � � ������7�� r�N)F)�__name__� __module__� __qualname__�__doc__r rrr*�__annotations__r rr�logging�DEBUGr3r5r/r-� contextlib�contextmanagerrErArR�rrr r s�� �(*�G�X�h�s�m� $�)�%'�E�8�H�S�M� "�'�� (� #*�W�]�]��*4�X� 5� 5���� *�� *��2rr c�j��eZdZdZddgZgd�Z�fd�Zd�Z�fd�Zd�Z d �Z d �Z e d ��Z d �Z�xZS) � SingleSelectzCA multiselect which only allows you to select one item for an event� _selected�selected)� set_options� set_selection�add�clear�selectc �0��||_t�|� �yrS)r9�superr)rr9� __class__s �rrzSingleSelect.__init__�s����� � ���rc���tjjdi|j��|_|j |jdd�|j dd�|j d|j�y)Nr`rrar])r�widgets� MultiSelectr9rr3r/� select_oners rrzSingleSelect._setup�sS���Z�Z�+�+�:�d�k�k�:�� � ���t�z�z�;��8� ���t�Z�(� � � �[�$�/�/�2rc�$��t�|�|i|��yrS)rhr-)rr8r9ris �rr-zSingleSelect._signal�s��� ����(��(rc� �|j�5|jjr|jjdgng}||j_ddd�|jd|jj�y#1swY�0xYw)N�����ra)rErrrA)r�_�vals rrmzSingleSelect.select_one�sg�� � � � !�,0�J�J�,<�,<�4�:�:�#�#�B�'�(�"�C�"�D�J�J� �"� � � �:�t�z�z�/�/�0�"� !�s �AB�B c�&�||j_yrS�r�options)rrus rrbzSingleSelect.set_options�s��$�� � �rc�&�g|j_yrSrtrs rrezSingleSelect.clear�s���� � �rc�.�|jjSrS�rrrs rrzSingleSelect.value�s���z�z���rc�(�|g|j_yrSrx)r� selections rrczSingleSelect.set_selection�s��%�;�� � �r)rTrUrVrWr r rrr-rmrbre�propertyrrc� __classcell__�ris@rr_r_�sL���M��J�'�G� F�E��3� )�1� %� �� �� �'rr_c���eZdZdZgd�ZddgZd�fd� Zd�Zdd�Ze d��Z e d ��Z e d ��Z dd �Z d �Zd �Zd�Zd�Zd�Zd�Z�xZS)� FileSelectorz�Panel-based graphical file selector widget Instances of this widget are interactive and can be displayed in jupyter by having them as the output of a cell, or in a separate browser tab using ``.show()``. )�protocol_changed�selection_changed�directory_entered� home_clicked� up_clicked� go_clicked�filters_changed� set_filters�go_homec�^��|rt|�\|_}ndtj�c|_}||_t |t �r|n t |�xsd|_||_|xsgD�cgc]}tj|���c}|_ d|_ t�|�9�ycc}w)a� Parameters ---------- url : str (optional) Initial value of the URL to populate the dialog; should include protocol filters : list(str) (optional) File endings to include in the listings. If not included, all files are allowed. Does not affect directories. If given, the endings will appear as checkboxes in the interface ignore : list(str) (optional) Regex(s) of file basename patterns to ignore, e.g., "\." for typical hidden files on posix kwargs : dict (optional) To pass to file system instance �filez{}N)r� init_protocol�os�getcwd�init_urlrHr*� init_kwargs�filters�re�compile�ignore�_fsrhr)r�urlr�r�r9�iris �rrzFileSelector.__init__�s����" �&4�S�&9� #�D� ��&,�b�i�i�k� #�D� ���� �&0���&=�F�3�v�;�W�SW����� �.4�l��l�;�l��r�z�z�!�}�l�;�� ���� �����<s�0B*c �b�tjjd|jddd��|_tjj t t�|jdd��|_ tjjd |jd� �|_ tjjd dd � �|_ td��|_tjjdddd��|_tjjdddd��|_|j%|jdd��|j%|jddd��|j%|j"ddd��|j%|j ddd��|j%dd�|jj'd|j(�|j%dd�|jj*|_|j.|_tjj3ggddd �!�|_|j%|j4d"d��tj6tj8|j|j�tj8|j |j"|j|j|j4�|jj:�|_|j=|j>�|jA�y)#Nr��end� stretch_width�max)r$r�align� sizing_mode� width_policy�protocol�center)rurr$r�r9)r$rr�u⇨�-)r$r��width� )�sizeu🏠�(�)r$r��heightr�u‹r�T)r1r��clicksr�r�r�rar�F�min)rru�inliner�r�r�)!rrk� TextInputr�r��Select�sortedr r�r�r�r9�Button�gor_�main�home�upr3r/r�r� prev_protocol�storage_options� prev_kwargs� CheckBoxGroup� filter_sel�Column�Rowrr�r�r�rs rrzFileSelector._setup�se���:�:�'�'���-�-��'�� (� ���� � �)�)��0�1��$�$��� *� �� � �j�j�*�*���!1�!1��+� �� ��*�*�#�#��e�2�#�F��� �b�)�� ��J�J�%�%�6��B�e�%�T�� ��*�*�#�#��b��5�#�Q��� ���t�}�}�&8�t��D� ���t�w�w� �h�T��B� ���t�w�w� �h�T��B� ���t�y�y�.�(���F� ���t�0�1� � � ���*�d�&<�&<�=� ���t�0�1�!�]�]�0�0����/�/����*�*�2�2��b��e�%�3� ��� ���t���(9���E��Y�Y� �F�F�4�=�=�$�+�+� .� �F�F�4�9�9�d�g�g�t�x�x����$�/�/� J� �I�I�O�O� �� � ������&� ���rc��||_|r#||j_||j_yg|j_g|j_yrS)r�r�rur)rr�s rr�zFileSelector.set_filters+s<���� � �&-�D�O�O� #�$+�D�O�O� !�&(�D�O�O� #�$&�D�O�O� !rc�\�tj|jj�xsiS)z'Value of the kwargs box as a dictionary)�ast� literal_evalr9rrs rr�zFileSelector.storage_options4s$������ � � 1� 1�2�8�b�8rc��|j�6t|jj�}|di|j��|_|jS)zCurrent filesystem instancer])r�rr�rr�)r�clss r�fszFileSelector.fs9s@�� �8�8� �&�t�}�}�':�':�;�C��2�T�1�1�2�D�H��x�x�rc��|jjr2|jj�d|jjd��SdS)zURL of currently selected itemz://rN)r�rr�rs r�urlpathzFileSelector.urlpathAsG�� �y�y���� � �#�#�$�C�� � ����(:�';� <� �� rc�v�|j� td��t|j|j|||�S)a�Create OpenFile instance for the currently selected item For example, in a notebook you might do something like .. code-block:: [ ]: sel = FileSelector(); sel # user selects their file [ ]: with sel.open_file('rb') as f: ... out = f.read() Parameters ---------- mode: str (optional) Open mode for the file. compression: str (optional) The interact with the file as compressed. Set to 'infer' to guess compression from the file ending encoding: str (optional) If using text mode, use this encoding; defaults to UTF8. zNo file selected)r�r'rr�)r�mode� compression�encodings r� open_filezFileSelector.open_fileJs5��0 �<�<� ��/�0� 0��������t�[�(�K�Krc�2�||_|j�yrS)r�r�)r�valuess rr�zFileSelector.filters_changedfs���� � ���rc���|j�y|jj|j�r4|jj|j�|j_|j �yrS)r�r��isdir�_strip_protocolr�rr��rrqs rr�zFileSelector.selection_changedjsK�� �<�<� � � �7�7�=�=���� &�!�W�W�4�4�T�\�\�B�D�H�H�N� ���rc����|j|jjk7s|j|jk7r3d|_|jj|_|j|_t |jj|jjd��d���}|D��cgc]"�t�fd�|jD��s���$}}|D�cic])}|ddk(rd|d jd d �d z|d ��+}}|D�cic])}|dd k(rd|d jd d �d z|d ��+}}|jrB|j�D���cic]&\}�t�fd�|jD��r|���(}}}|jj!t#di|�|���ycc}wcc}wcc}wcc}}w)NT)�detailc� �|dS)Nr$r])�xs r�<lambda>z)FileSelector.go_clicked.<locals>.<lambda>zs��1�V�9r)�keyc3�l�K�|]+}|j�djdd�d����-y�w)r$�/rrpN)�match�rsplit)�.0r��ls �r� <genexpr>z*FileSelector.go_clicked.<locals>.<genexpr>s1�����R�k��q�w�w�q��y�/�/��Q�7��;�<�k�s�14�type� directoryu📁 r$r�rrpr�u📄 c3�@�K�|]}�j|����y�wrS)�endswith)r��ext�vs �rr�z*FileSelector.go_clicked.<locals>.<genexpr>�s�����?�,�3�q�z�z�#��,�s�r])r�r�rr�r�r�r�r��lsr��anyr�r�r��itemsr�rb�dict) rrq�listingr��o�folders�files�kr�s ` `rr�zFileSelector.go_clickedqs���� � � �$�-�-�"5�"5� 5����4�#7�#7�7��D�H�!%���!4�!4�D� �#�3�3�D� �� �G�G�J�J�t�x�x�~�~�d�J� 3�9L� �� � ����R�d�k�k�R�R� �� � �� �����y�K�'� �a��i�&�&�s�A�.�r�2� 2�A�f�I� =�� � �� �����y�F�"� �a��i�&�&�s�A�.�r�2� 2�A�f�I� =�� � � �<�<�"�K�K�M��)�D�A�q��?�$�,�,�?�?��1��)� �� � � ���d�6�W�6��6�7��+ ��  ��  �� s�4'F:�!.F?�.G�%+G c�V�d|_g|j_d|j_y)N�)r�r�rur�rr�s rr�zFileSelector.protocol_changed�s ������� � ������rc���|j|j_|j|j_|j |j _|j�yrS)r�r�rr�r9r�r�r�r�s rr�zFileSelector.home_clicked�s?��"�0�0�� � �� �,�,�� � ��������� ���rc��|jj|jj�|j_|j �yrS)r��_parentr�rr�r�s rr�zFileSelector.up_clicked�s,������������8����� ���r)NNNNrS)�rbNN)rTrUrVrWr r rrr�r{r�r�r�r�r�r�r�r�r�r�r|r}s@rrr�s����� �G��I� &�E��8+�Z'��9��9������ �� �L�8�� 8�D� � rr)r�r[rYr�r��typingrrrr�corerrr�registryr � extension� getLoggerrGr r_rr]rr�<module>r�sh�� ��� � �%��@�@�+� �� � �� �� � �<� (��U�U�p$'�7�$'�NP�7�Pr

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/noah-vh/mcp-server-clickup'

If you have feedback or need assistance with the MCP directory API, please join our Discord server