Open jlumpe opened 11 months ago
See snakemake/snakemake#2917, that will allow an explicit from snakemake.script import snakemake
at runtime (so no if TYPE_CHECKING
needed). I used a solution similar to yours for a while, but by implementing it in snakemake itself, it allows static analysis independent of the editor etc.
Don't know how easy this is to do with an extension, but an annoyance of writing workflows in VS Code is the implicitly defined
snakemake
global variable. The type checker is not aware of this and will generate an "undefined variable" warning for each usage.I'm using the following workaround for this:
But it would be really great if this could be automatically applied somehow.