Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlatr committed Jul 14, 2023
1 parent 83adf80 commit ce1e05f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ in development
* Recognize variadic generics type variables (PEP 646).
* Better ``attrs`` support: generate precise ``__init__`` method from analyzed fields, supports
principal ``attrs`` idioms:
- ``attr.s(auto_attribs, kw_only, auto_detect, init)``/``attrs.define(...)``
- ``attr.ib(init, default, factory, converter, type, kw_only)``/``attrs.field(...)``
- ``attr.Factory(list)``
- ``attr.s(auto_attribs, kw_only, auto_detect, init)``/``attrs.define(...)``
- ``attr.ib(init, default, factory, converter, type, kw_only)``/``attrs.field(...)``
- ``attr.Factory(list)``
It does not support the decorators based syntax for setting the validator/factory/default or converter.

pydoctor 23.4.1
Expand Down
4 changes: 2 additions & 2 deletions pydoctor/astutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ class _V(enum.Enum):
NoValue = enum.auto()
_T = TypeVar('_T', bound=object)
def _get_literal_arg(args:BoundArguments, name:str,
typecheck:'type[_T]|tuple[type[_T],...]') -> Union['Literal[_V.NoValue]', _T]:
typecheck:Union[Type[_T], Tuple[Type[_T],...]]) -> Union['Literal[_V.NoValue]', _T]:
"""
Helper function for L{get_literal_arg}.
Expand Down Expand Up @@ -485,7 +485,7 @@ def _get_literal_arg(args:BoundArguments, name:str,
return value #type:ignore

def get_literal_arg(args:BoundArguments, name:str, default:_T,
typecheck:'type[_T]|tuple[type[_T],...]',
typecheck: Union[Type[_T], Tuple[Type[_T],...]],
lineno:int, module: 'model.Module') -> _T:
"""
Retreive the literal value of an argument from the L{BoundArguments}.
Expand Down

0 comments on commit ce1e05f

Please sign in to comment.