You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: Pylance in VSCode is unable to recognize the dynamically imported plugins in the papercast package, leading to issues like "Go to definition" not working as expected for the installed plugins.
Example:
frompapercast.processorsimportArxivProcessor
In the above import statement, Pylance does not recognize the ArxivProcessor imported from the papercast.processors package after papercast-arxiv plugin is installed.
Possible solution:
Change the plugin structure to one folder with four files: subscribers.py, processors.py, publishers.py, types.py Enforce file naming conventions for plugins #11 . Classes of each type should belong to each file. Maybe not a bad idea anyway.
At install time for each plugin, generate stubs for each file, and place them in the corresponding submodule folders e.g. papercast/processors/stubs/. Alternatively, figure out a way to generate stubs for only a specific class from within a module using stubgen.
Modify the __init__.pyi file to be able to import from papercast.processors import ArxivProcessor instead of from papercast.processors.arxiv_processor import ArxivProcessor.
Issue: Pylance in VSCode is unable to recognize the dynamically imported plugins in the papercast package, leading to issues like "Go to definition" not working as expected for the installed plugins.
Example:
In the above import statement, Pylance does not recognize the ArxivProcessor imported from the papercast.processors package after papercast-arxiv plugin is installed.
Possible solution:
papercast/processors/stubs/
. Alternatively, figure out a way to generate stubs for only a specific class from within a module using stubgen.__init__.pyi
file to be able to import frompapercast.processors
importArxivProcessor
instead of frompapercast.processors.arxiv_processor
importArxivProcessor
.papercast/processors/__init__.py
:from papercast.processors import *
Notes:
The text was updated successfully, but these errors were encountered: