viccie30 · GitHub

I'll be working on this in the next few days, expect to see modifications coming in.

I wasn't fond of the new format_class and format_merged_init rendering utilities, because essentially what we want to do when merging the __init__ method into the class docs is to either:

  • concatenate the type parameters of both the class and init method:

    class Foo[T][U](param1: T, param2: U)

    ...but that might prevent formatting by Black/Ruff if it's invalid syntax (I'm not sure it is)

  • or actually merge/combine the type parameters together:

    class Foo[T, U](param1: T, param2: U)

    ...even if that's not entirely true, because as long as each type parameter cross-links to the right symbol, I think it's good.

Read the original on github.com ↗