sphinx/tests/roots/test-ext-autodoc/target/preserve_defaults.py

20 lines
407 B
Python
Raw Normal View History

from datetime import datetime
from typing import Any
CONSTANT = 'foo'
SENTINEL = object()
def foo(name: str = CONSTANT,
sentinal: Any = SENTINEL,
now: datetime = datetime.now()) -> None:
"""docstring"""
class Class:
"""docstring"""
def meth(self, name: str = CONSTANT, sentinal: Any = SENTINEL,
now: datetime = datetime.now()) -> None:
"""docstring"""