#35179: Admindocs treats model some model methods containing positional-only arguments or keyword-only arguments as attributes -----------------------------------+-------------------------------------- Reporter: David Sanders | Owner: nobody Type: Bug | Status: new Component: contrib.admindocs | Version: 5.0 Severity: Normal | Resolution: Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------------+-------------------------------------- Changes (by David Sanders):
* 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. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/0107018d8e9cb5bc-e6289479-ae4a-420d-b4c9-eda0fcbf95ea-000000%40eu-central-1.amazonses.com.