blob: 7042f7ac4a66d0edf3d3be90924da8db37714803 (
plain)
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
|
"""Hook specifications for the tox project - see https://pluggy.readthedocs.io/"""
from argparse import ArgumentParser
from typing import Type
import pluggy
from tox.config.sets import ConfigSet
from tox.tox_env.api import ToxEnv
from tox.tox_env.register import ToxEnvRegister
from .util import NAME
hook_spec = pluggy.HookspecMarker(NAME)
# noinspection PyUnusedLocal
@hook_spec
def tox_add_option(parser: ArgumentParser) -> None:
"""add cli flags"""
# noinspection PyUnusedLocal
@hook_spec
def tox_add_core_config(core: ConfigSet) -> None:
"""add options to the core section of the tox"""
# noinspection PyUnusedLocal
@hook_spec
def tox_register_tox_env(register: ToxEnvRegister) -> Type[ToxEnv]:
"""register new tox environment types that can have their own argument"""
|