File: dataosshell.py

package info (click to toggle)
python-beartype 0.22.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,504 kB
  • sloc: python: 85,502; sh: 328; makefile: 30; javascript: 18
file content (44 lines) | stat: -rw-r--r-- 1,561 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python3
# --------------------( LICENSE                            )--------------------
# Copyright (c) 2014-2025 Beartype authors.
# See "LICENSE" for further details.

'''
Project-wide **shell singletons** (i.e., magic constants pertaining to the
parent shell encapsulating the active Python interpreter, including the names of
:mod:`beartype`-specific environment variables officially recognized by
:mod:`beartype`).

This private submodule is *not* intended for importation by downstream callers.
'''

# ....................{ IMPORTS                            }....................
from beartype.typing import (
    Dict,
    Optional,
)

# ....................{ VARS ~ conf                        }....................
# @beartype-specific environment variables configuring beartype configurations
# (i.e., "beartype.BeartypeConf" instances).

SHELL_VAR_CONF_IS_COLOR_NAME = 'BEARTYPE_IS_COLOR'
'''
Name of the **color configuration environment variable** (i.e.,
:mod:`beartype`-specific environment variable officially recognized by
:mod:`beartype` as globally configuring the value of the
:attr:`beartype.BeartypeConf.is_color` tri-state boolean).
'''


SHELL_VAR_CONF_IS_COLOR_VALUE_TO_OBJ: Dict[str, Optional[bool]] = {
    'True': True,
    'False': False,
    'None': None,
}
'''
Dictionary mapping from each permissible string value for the **color
configuration environment variable** (i.e., whose name is
:data:`.CONF_IS_COLOR_NAME`) to the corresponding value of the
:attr:`beartype.BeartypeConf.is_color` tri-state boolean.
'''