* summary: Admindocs omits model methods containing only keyword-only
arguments =>
Admindocs treats model some model methods containing positional-only
arguments or keyword-only arguments as attributes
Old description:
> Given the model:
>
> {{{
> class Foo(Model):
> def arg_and_kwarg_only_method(self, arg, *, kwarg): ...
> def kwarg_only_method(self, *, kwarg): ...
> }}}
>
> The method `arg_and_kwarg_only_method()` will be documented but
> `kwarg_only_method()` will be omitted.
New description:
Given the model:
{{{
class Foo(Model):
def arg_kwarg_method(self, arg, kwarg=None): ...
def posarg_only_method(self, posarg, /): ...
def kwarg_only_method(self, *, kwarg): ...
def posarg_only_and_kwarg_only_method(self, posarg, /, *, kwarg): ...
def posarg_only_and_arg_and_kwarg_only_method(self, posarg, /, arg, *,
kwarg): ...
}}}
The following are documented as methods:
- `arg_kwarg_method()`
- `posarg_only_method()`
- `posarg_only_and_kwarg_only_method()`
The following are documented as attributes:
- `kwarg_only_method()`
- `posarg_only_and_arg_and_kwarg_only_method()`
--
--
Ticket URL: <https://code.djangoproject.com/ticket/35179#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.