qiime2 / qiime2

Official repository for the QIIME 2 framework.
https://qiime2.org
BSD 3-Clause "New" or "Revised" License
473 stars 240 forks source link

Typing issue with `Plugin` attributes #809

Open colinvwood opened 5 hours ago

colinvwood commented 5 hours ago

The methods, visualizers, and pipelines class attributes of the Plugin class are typed as classes (here) but the methods called on these class attributes (e.g. register_function) are instance methods, and the attributes themselves are instances when used in plugin_setup.py files. Thus e.g. Type['PluginMethods'] should probably just be typed as 'PluginMethods'.

ebolyen commented 2 hours ago

I think this was the end result of an awful lot of fighting with Sphinx.

You're right that they are ultimately instance methods.

It also doesn't look like the docs use those attributes directly anymore, so I think we can change it: https://develop.qiime2.org/en/latest/plugins/references/api/plugin.html#action-registration

Will just want to make sure everything still looks right.