stfc / PSyclone

Domain-specific compiler and code transformation system for Finite Difference/Volume/Element Earth-system models in Fortran
BSD 3-Clause "New" or "Revised" License
104 stars 27 forks source link

Improve kwargs documentation #2719

Open sergisiso opened 1 week ago

sergisiso commented 1 week ago

We had the same problem on the PSyIR Nodes and Symbols kwargs, and the Transformations options which are passed to the super class. I don't like having them duplicated as we never check them when they are updated, or when new arguments added to the subclasses, and would be quite hard to review.

Adding a link to the super() is a good and simple solution (which some IDEs, static type tools may be able to follow).

There is a more complex solution of programmatically modifying the __doc__ to include the BASE.__doc__ or even spit __doc__ to separate the kwargs so that they can be included in the subclass docsting, but this may be over-engineering it, and probably not for this PR.

_Originally posted by @sergisiso in https://github.com/stfc/PSyclone/pull/2692#discussion_r1744024669_