ó
    &ÝNjz  ã                   ót   • S r SSKrSSKr/ SQr/ SQrS\S-  4S jrS\4S jrS\4S jr	S\4S	 jr
S\4S
 jrg)zThe bag of utility functions.é    N)ÚdumbÚ N)ÚDATALORE_AGENT_MODEÚDATALORE_HOMEÚDATALORE_USERÚreturnc                  ó˜   • [         R                  R                  SS5      n U c  gU R                  5       R	                  5       n U S;   a  U $ g)a  Get forced progress rendering mode from environment.

Supported values:

- ``auto``: Use the normal automatic detection
- ``stdout``: Force plain terminal/stdout tqdm
- ``logging``: Force logging-based tqdm

The value is case-insensitive.
Invalid values are ignored.
ÚTQDM_LOGGABLE_FORCEN>   ÚautoÚstdoutÚlogging)ÚosÚenvironÚgetÚstripÚlower)Úvalues    ÚP/home/mande/repo/quber/.venv/lib/python3.13/site-packages/tqdm_loggable/utils.pyÚget_forced_progress_moder      sF   € ô  �J‰J�N‰NÐ0°$Ó7€EØ�}Øà�K‰K‹M×ÑÓ!€EØÐ-Ó-Øˆàó    c                  ó  • [        5       (       a  g[        5       (       a  g[        R                  R	                  5       (       d  g[
        R                  R                  SS5      n U (       a  U R                  5       n U [        ;   a  gg)zIGuess if we are an interactive session and can render real progress bars.TFÚTERMN)
Úis_notebookÚis_continous_integrationÚsysr   Úisattyr   r   r   r   ÚNON_INTERACTIVE_TERM_VALUES)Úterms    r   Úis_interactive_sessionr   9   sa   € ô ‡}�}Øä×!Ñ!Øä�:‰:×Ñ×ÑØä�:‰:�>‰>˜& $Ó'€DÞØ�z‰z‹|ˆàÔ*Ó*Øàr   c                  óv   •  SSK Jn   SU " 5       R                  ;  a  g g! [         a     g[         a     gf = f)z3Guess if we are an in Jupyter notebook environment.r   ©Úget_ipythonÚIPKernelAppFT)ÚIPythonr"   ÚconfigÚImportErrorÚAttributeErrorr!   s    r   r   r   O   sF   € ðÝ'Ø¡£× 4Ñ 4Ó4Øð 5ð øô	 ó ÙÜó Ùðús   ‚   
8¬	8·8c                  ó(   • S[         R                  ;   $ )a  Disable progress bars in continous integration systems.

Github Actions (and other CI) may allocate an interactive
terminal for a job. However, in case of Github,
they do not seem to be able to refresh the progress bar correctly,
floooding the CI log with progress bar lines.
ÚCI)r   r   © r   r   r   r   ]   s   € ð ”2—:‘:ÑÐr   c                  óx   • [         R                  R                  SS5      S:X  a  g[        S [         5       5      $ )a›  Guess if we are in a session where only stdout is available.

Datalore is an example of such environment. Datalore provides code autocompletion
and documentation pop ups, as well as other features that make it desirable to use.
See https://www.jetbrains.com/datalore/

A code report has been privately logged to Datalore support for enquiring about the
feature disparity between Datalore and Jupyter Notebooks.
ÚAGENT_MANAGER_HOSTNÚdataloreTc              3   ó`   #   • U  H$  n[         R                  R                  U5      v •  M&     g 7f)N)r   r   r   )Ú.0Únames     r   Ú	<genexpr>Ú)is_stdout_only_session.<locals>.<genexpr>v   s"   é € ÐBÒ0A¨Œr�z‰z�~‰~˜d×#Ð#Ò0Aùs   ‚,.)r   r   r   ÚanyÚDATALORE_ENV_VARSr*   r   r   Úis_stdout_only_sessionr5   i   s1   € ô 
‡z�z‡~�~Ð*¨DÓ1°ZÓ?ØäÑBÕ0AÓBÓBÐBr   )Ú__doc__r   r   r   r4   Ústrr   Úboolr   r   r   r5   r*   r   r   Ú<module>r9      s`   ðÙ #ã 	Û 
ò 1Ð òÐ ð #¨¡*ô ð6 ô ð,�Tô ð	 $ô 	ðC õ Cr   