First time here? Check out the FAQ!

Revision history  [back]

Wing's static analyzer doesn't understand dynamic functions such as WorkflowFactory, which seems to be a specialized way to import modules. In cases like this, you can add type hints to help the static analyzer. An example could be:

from import band_structure
from aiida.plugins.factories import WorkflowFactory
PwBandStructureWorkChain = WorkflowFactory('')
inst = PwBandStructureWorkChain()
inst: band_structure.PwBandStructureWorkChain

The type hint specifies that inst is an instance of the band_structure.PwBandStructureWorkChain class and with it, autocomplete lists attributes & methods and goto definition works on the methods.