File: types.py

package info (click to toggle)
python-virtualenv 20.38.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,216 kB
  • sloc: python: 12,110; sh: 177; ansic: 61; csh: 53; makefile: 8
file content (27 lines) | stat: -rw-r--r-- 572 bytes parent folder | download
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
from __future__ import annotations

from typing import Protocol


class _VersionInfo(Protocol):
    major: int
    minor: int


class Interpreter(Protocol):
    prefix: str
    system_prefix: str
    system_executable: str
    free_threaded: bool
    version_info: _VersionInfo
    sysconfig_vars: dict[str, object]


class MakeInterpreter(Protocol):
    def __call__(
        self,
        sysconfig_vars: dict[str, object] | None = ...,
        prefix: str = ...,
        free_threaded: bool = ...,
        version_info: tuple[int, ...] = ...,
    ) -> Interpreter: ...