summaryrefslogtreecommitdiff
path: root/tests/roots/test-ext-autodoc/target/preserve_defaults.py
blob: 2759f27e89a115561cc1139b441e79f3384150f6 (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
32
from __future__ import annotations

from datetime import datetime
from typing import Any

CONSTANT = 'foo'
SENTINEL = object()


def foo(name: str = CONSTANT,
        sentinel: Any = SENTINEL,
        now: datetime = datetime.now(),
        color: int = 0xFFFFFF,
        *,
        kwarg1,
        kwarg2 = 0xFFFFFF) -> None:
    """docstring"""


class Class:
    """docstring"""

    def meth(self, name: str = CONSTANT, sentinel: Any = SENTINEL,
             now: datetime = datetime.now(), color: int = 0xFFFFFF,
             *, kwarg1, kwarg2 = 0xFFFFFF) -> None:
        """docstring"""

    @classmethod
    def clsmeth(cls, name: str = CONSTANT, sentinel: Any = SENTINEL,
                now: datetime = datetime.now(), color: int = 0xFFFFFF,
                *, kwarg1, kwarg2 = 0xFFFFFF) -> None:
        """docstring"""