-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathsession.pyi
77 lines (73 loc) · 2.55 KB
/
session.pyi
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
"""Type stubs for nox_poetry.session."""
from pathlib import Path
from typing import Any
from typing import Callable
from typing import Dict
from typing import Iterable
from typing import List
from typing import Mapping
from typing import NoReturn
from typing import Optional
from typing import overload
from typing import Sequence
from typing import TypeVar
from typing import Union
import nox.sessions
import nox.virtualenv
from nox_poetry.poetry import DistributionFormat
class Session:
_session: nox.Session
def __init__(self, session: nox.Session) -> None: ...
def install(self, *args: str, **kwargs: Any) -> None: ...
def installroot(
self, *, distribution_format: DistributionFormat, extras: Iterable[str] = ...
) -> None: ...
def export_requirements(self) -> Path: ...
def build_package(self, *, distribution_format: DistributionFormat) -> str: ...
# delegated interface
@property
def env(self) -> Dict[str, str]: ...
@property
def posargs(self) -> List[str]: ...
@property
def virtualenv(self) -> nox.virtualenv.ProcessEnv: ...
@property
def python(self) -> Optional[Union[str, Sequence[str], bool]]: ...
@property
def bin_paths(self) -> Optional[List[str]]: ...
@property
def bin(self) -> Optional[str]: ...
def create_tmp(self) -> str: ...
@property
def interactive(self) -> bool: ...
def chdir(self, dir: str) -> None: ...
def cd(self, dir: str) -> None: ...
def run(
self, *args: str, env: Optional[Mapping[str, str]] = ..., **kwargs: Any
) -> Optional[Any]: ...
def run_always(
self, *args: str, env: Optional[Mapping[str, str]] = ..., **kwargs: Any
) -> Optional[Any]: ...
def conda_install(
self, *args: str, auto_offline: bool = True, **kwargs: Any
) -> None: ...
def notify(self, target: Union[str, nox.sessions.SessionRunner]) -> None: ...
def log(self, *args: Any, **kwargs: Any) -> None: ...
def error(self, *args: Any) -> NoReturn: ...
def skip(self, *args: Any) -> NoReturn: ...
Python = Optional[Union[str, Sequence[str], bool]]
SessionFunction = Callable[[Session], None]
NoxSessionFunction = Callable[[nox.Session], None]
SessionDecorator = Callable[[SessionFunction], NoxSessionFunction]
@overload
def session(__func: SessionFunction) -> NoxSessionFunction: ...
@overload
def session(
__func: None = ...,
python: Python = ...,
py: Python = ...,
reuse_venv: Optional[bool] = ...,
name: Optional[str] = ...,
venv_backend: Any = ...,
venv_params: Any = ...,
) -> SessionDecorator: ...