File: __init__.py

package info (click to toggle)
python-executing 2.2.0-0.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,860 kB
  • sloc: python: 10,235; sh: 48; makefile: 10
file content (28 lines) | stat: -rw-r--r-- 831 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
"""
Get information about what a frame is currently doing. Typical usage:

    import executing

    node = executing.Source.executing(frame).node
    # node will be an AST node or None
"""

from collections import namedtuple
_VersionInfo = namedtuple('_VersionInfo', ('major', 'minor', 'micro'))
from .executing import Source, Executing, only, NotOneValueFound, cache, future_flags

from ._pytest_utils import is_pytest_compatible

try:
    from .version import __version__ # type: ignore[import]
    if "dev" in __version__:
        raise ValueError
except Exception:
    # version.py is auto-generated with the git tag when building
    __version__ = "???"
    __version_info__ = _VersionInfo(-1, -1, -1)
else:
    __version_info__ = _VersionInfo(*map(int, __version__.split('.')))


__all__ = ["Source","is_pytest_compatible"]