Skip to main content
Glama

ClickUp Operator

by noah-vh
main.cpython-312.pyc16.4 kB
� �MMgB/����ddlZddlZddlZddlZddlZddlZddlZddlmZddl m Z ddl m Z m Z mZmZmZmZmZmZddlmZmZddlmZeedfZej6e�Zd eed eefd �ZGd �d �Z d(dededeed eefd�Z e dedeed eee ee effd��Z! d)dedededede"deed eee"eeffd�Z# d*dedededeed eee"eff d�Z$deeeeefde"d eeeeffd�Z%ded eefd�Z& d+ded e"d!e"d efd"�Z' d,deed#ee ed$e"de"d%e"deed e"fd&�Z( d-deed#ee ed$e"d%e"deed e eeeff d'�Z)y).�N)� OrderedDict)�contextmanager)�IO�Dict�Iterable�Iterator�Mapping�Optional�Tuple�Union�)�Binding� parse_stream)�parse_variableszos.PathLike[str]�mappings�returnc#�K�|D]<}|jr*tjd|jj�|���>y�w)Nz;Python-dotenv could not parse statement starting at line %s)�error�logger�warning�original�line)r�mappings �WC:\Users\noahv\Documents\GitHub\clickup-operator\.venv\Lib\site-packages\dotenv/main.py�with_warn_for_invalid_linesrs<������ �=�=� �N�N�M�� � �%�%� �� � �s�AAc���eZdZ ddeedeeededeedededdfd �Ze de eefd ��Z de eeeffd �Z de eeeeffd �Zdefd �Zdedeefd�Zy)�DotEnvN� dotenv_path�stream�verbose�encoding� interpolate�overriderc�f�||_||_d|_||_||_||_||_y�N)rr�_dictr r!r"r#)�selfrrr r!r"r#s r�__init__zDotEnv.__init__$s7��/:���)/�� �9=�� �$�� �'/�� �!,���&�� �c#�K�|jrXtjj|j�r/t |j|j ��5}|��ddd�y|j �|j ��y|jr$tjd|jxsd�tjd���y#1swYyxYw�w)N�r!z3Python-dotenv could not find configuration file %s.�.env�) r�os�path�isfile�openr!rr r�info�io�StringIO)r'rs r� _get_streamzDotEnv._get_stream5s����� � � ������t�/?�/?� @��d�&�&����?�6�� �@�?� �[�[� $��+�+� ��|�|�� � �I��$�$�.����+�+�b�/� !�@�?�s�AC�C �A,C� C�Cc��|jr |jS|j�}|jr1tt ||j ���|_|jSt|�|_|jS)zReturn dotenv as dict)r#)r&�parser"r�resolve_variablesr#)r'� raw_valuess r�dictz DotEnv.dictDsc�� �:�:��:�:� ��Z�Z�\� � � � �$�%6�z�D�M�M�%Z�[�D�J��z�z��%�Z�0�D�J��z�z�r)c#��K�|j�5}tt|��D])}|j��|j|jf���+ ddd�y#1swYyxYw�wr%)r5rr�key�value)r'rrs rr7z DotEnv.parseRsQ���� � � � �6�6�|�F�7K�L���;�;�*�!�+�+�w�}�}�4�4�M� � � �s!�A*�$A�A� A*�A'�#A*c���|j�sy|j�j�D]:\}}|tjvr |js�%|��(|tj|<�<y)zI Load the current dotenv as system environment variable. FT)r:�itemsr.�environr#)r'�k�vs r�set_as_environment_variablesz#DotEnv.set_as_environment_variablesXsX���y�y�{���I�I�K�%�%�'�D�A�q��B�J�J��t�}�}���}� !�� � �1� � (� r)r<c��|j�}||vr||S|jr!tjd||j�y)z zKey %s not found in %s.N)r:r rrr)r'r<�datas r�getz DotEnv.getgsA���y�y�{�� �$�;���9� � �<�<� �N�N�4�c�4�;K�;K� L�r))NFNTT)�__name__� __module__� __qualname__r �StrPathr�str�boolr(rrr5rr:r r7rCrF�r)rrr#s���%)��"&� ��'��g�&�'���C��!�'�� '� �3�-� '� � '��'� �'�"� "�X�b��g�.� "�� "� �d�3��� �-�.� �5�x��c�8�C�=�&8� 9�:�5� �d� � �s� �x��}� r)rr� key_to_getr!c�<�t|d|��j|�S)z Get the value of a given key from the given .env. Returns `None` if the key isn't found or doesn't have a value. T)r r!)rrF)rrNr!s r�get_keyrPus�� �+�t�h� ?� C� C�J� O�Or)r/c#�K�tj|�j�tjd|d��5}d} t ||��5}||f��ddd�ddd��!tjj|�ytjj�|d�#1swY�VxYw#t $r }|}Yd}~�id}~wwxYw#1swY�rxYw�w)N�wF)�moder!�deleter+) �pathlib�Path�touch�tempfile�NamedTemporaryFiler1� BaseException�shutil�move�namer.�unlink)r/r!�destr�source�errs r�rewriterb�s�����  �L�L������ � $� $�#��� O�SW��� ��d�X�.�&��t�n�$�/� P� �}�� � �D�I�I�t�$� � � �$�)�)�����/�.��� ��E�� �� P� O�sY�<C�C� B7�B+�B7�A C�+B4 �0B7�7 C �C�C�C � C�C�C� key_to_set� value_to_set� quote_mode�exportc��|dvrtd|����|dk(xs|dk(xr|j� }|r"dj|jdd��}n|}|r d|�d |�d �}n|�d |�d �}t ||� �5\} } d } d } t t | ��D]p} | j|k(r| j|�d } �&| j| jj�| jjjd � } �r| s$| r| jd �| j|�ddd�d ||fS#1swY�xYw)z� Adds or Updates a key/value to the given .env If the .env path given doesn't exist, fails instead of risking creating an orphan .env somewhere in the filesystem )�always�auto�neverzUnknown quote_mode: rhriz'{}'�'z\'zexport �=� r+FTN) � ValueError�isalnum�format�replacerbrrr<�writer�string�endswith)rrcrdrerfr!�quote� value_out�line_outr`r_�replaced�missing_newliners r�set_keyrz�s\���4�4��/� �|�<�=�=� �h�� A� �&� � ?��)=�)=�)?�%?� �  ��M�M�,�"6�"6�s�E�"B�C� � � � ��Z�L��)��B�7�� �\��9�+�R�0�� ��x� 0�N�V�T�����2�<��3G�H�G��{�{�j�(�� � �8�$���� � �7�+�+�2�2�3�&-�&6�&6�&=�&=�&F�&F�t�&L�"L�� I���� � �4� � �J�J�x� � 1� ��\� )�)� 1� 0�s �9B5D;�;E� key_to_unsetc��tjj|�stj d|�d|fSd}t ||��5\}}t t|��D]9}|j|k(rd}�|j|jj��; ddd�|stj d||�d|fS||fS#1swY�*xYw)z� Removes a given key from the given `.env` file. If the .env path given doesn't exist, fails. If the given key doesn't exist in the .env, fails. z(Can't delete from %s - it doesn't exist.NFr+Tz/Key %s not removed from %s - key doesn't exist.) r.r/�existsrrrbrrr<rrrrs)rr{rer!�removedr`r_rs r� unset_keyr�s��� �7�7�>�>�+� &����A�;�O��\�!�!��G� ��x� 0�N�V�T�2�<��3G�H�G��{�{�l�*���� � �7�+�+�2�2�3� I� 1� ����H�,�Xc�d��\�!�!� �L� � � 1� 0�s � AC�C�valuesr#c�H��i}|D]�\}}|�d}n�t|�}i�|r1�jtj��j|�n0�j|��jtj�dj �fd�|D��}|||<��|S)Nr-c3�@�K�|]}|j�����y�wr%)�resolve)�.0�atom�envs �r� <genexpr>z$resolve_variables.<locals>.<genexpr>�s�����A�5�4�T�\�\�#�.�5�s�)r�updater.r@�join)r�r#� new_valuesr]r=�result�atomsr�s @rr8r8�s����,.�J�� ��u� �=��F�#�E�*�E�,.�C��� � �2�:�:�&�� � �:�&�� � �:�&�� � �2�:�:�&��W�W�A�5�A�A�F�!� �4�� � �r)c#��K�tjj|�s td��tjj |�rtjj |�}d}tjj |�}||k7rd|��tjj tjj|tjj��}||}}||k7r�cyy�w)zL Yield directories starting from the given directory up to the root zStarting path not foundN) r.r/r}�IOErrorr0�dirname�abspathr��pardir)r/�last_dir� current_dir� parent_dirs r� _walk_to_rootr�s����� �7�7�>�>�$� ��/�0�0� �w�w�~�~�d���w�w���t�$���H��'�'�/�/�$�'�K� �k� !����W�W�_�_�R�W�W�\�\�+�r�w�w�~�~�%N�O� � +�Z�+�� �k� !�s �C1C6�4C6�filename�raise_error_if_not_found�usecwdc�j�d�}|s|�sttdd�rtj�}�n tj�}t }|j j|k(s3tjj|j j�sh|j�J�|j}|j j|k(r�4tjj|j j�s�h|j j}tjjtjj|��}t|�D]E}tjj||�} tjj| �s�C| cS|r t!d��y)z� Search in increasingly higher folders for the given file Returns path to the file if found, or an empty string otherwise c�\� tddddg��}t|d� S#t$rYywxYw)z> Decide whether this is running in a REPL or IPython notebook �__main__N�__file__)�fromlistF)� __import__�ModuleNotFoundError�hasattr)�mains r�_is_interactivez$find_dotenv.<locals>._is_interactives?�� ��j�$�� �|�L�D��4��,�,�,��#� �� �s �� +�+�frozenFzFile not foundr-)�getattr�sysr.�getcwd� _getframer��f_code� co_filenamer/r}�f_backr�r�r�r�r0r�) r�r�r�r�r/�frame� current_file�frame_filenamer�� check_paths r� find_dotenvr�s/��-���"�g�c�8�U�&C��y�y�{��� � ���� ��l�l�&�&�,�6�b�g�g�n�n� �L�L� $� $�? ��<�<�+� +�+��L�L�E� �l�l�&�&�,�6�b�g�g�n�n� �L�L� $� $�? � ���1�1���w�w���r�w�w���~�>�?�� ��&���W�W�\�\�'�8�4� � �7�7�>�>�*� %�� �'�  ��&�'�'� r)rr r"c�`�|� |� t�}t||||||��}|j�S)a�Parse a .env file and then load all the variables found as environment variables. Parameters: dotenv_path: Absolute or relative path to .env file. stream: Text stream (such as `io.StringIO`) with .env content, used if `dotenv_path` is `None`. verbose: Whether to output a warning the .env file is missing. override: Whether to override the system environment variables with the variables from the `.env` file. encoding: Encoding to be used to read the file. Returns: Bool: True if at least one environment variable is set else False If both `dotenv_path` and `stream` are `None`, `find_dotenv()` is used to find the .env file. �rrr r"r#r!)r�rrC)rrr r#r"r!�dotenvs r� load_dotenvr�AsB��0��v�~�!�m� � ������� �F� � .� .� 0�0r)c�\�|� |� t�}t||||d|��j�S)a� Parse a .env file and return its content as a dict. The returned dict will have `None` values for keys without values in the .env file. For example, `foo=bar` results in `{"foo": "bar"}` whereas `foo` alone results in `{"foo": None}` Parameters: dotenv_path: Absolute or relative path to the .env file. stream: `StringIO` object with .env content, used if `dotenv_path` is `None`. verbose: Whether to output a warning if the .env file is missing. encoding: Encoding to be used to read the file. If both `dotenv_path` and `stream` are `None`, `find_dotenv()` is used to find the .env file. Tr�)r�rr:)rrr r"r!s r� dotenv_valuesr�gs=��.��v�~�!�m� � �������  � �d�f� r))�utf-8)rhFr�)rhr�)r,FF)NNFFTr�)NNFTr�)*r3�loggingr.rUr[r�rX� collectionsr� contextlibr�typingrrrrr r r r �parserrr� variablesrrKrJ� getLoggerrGrrrrPrbrLrzrr8r�r�r�r�rMr)r�<module>r�s%�� �� �� � ��#�%����*�&� ��'�'� (�� �� � �8� $���(�7�*;����@Q��O�O�j&� P�� P�� P��s�m� P��c�]� P��� ���s�m���e�B�s�G�R��W�$�%�&����2��%� .*��.*��.*��.*�� .*� � .*� �s�m� .*� �8�D�>�3�� #�$�.*�h�%� !��!��!��!��s�m� !�  �8�D�>�3� �� !�>� �U�3��� �-�.� /���� �S�(�3�-� � ��28��8��� �8�&�%*��+��+�"�+� �+� � +�^&*� $����%� #1��'�"�#1� �R��W� �#1��#1�� #1� � #1� �s�m� #1� �#1�N&*� $���%� ! ��'�"�! � �R��W� �! ��! �� ! � �s�m� ! �  �#�x��}� �� ! r)

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