Snakemake version
9.20.0
Describe the bug
Currently, the docs on writing python scripts run via the script directive still advise on using from snakemake.script import snakemake to let type hintig tools know what the type of the snakemake object used by the script is. This is however outdated since v9.17.0 (PR #4032), and has mislead me for quite a while. Yes, I see the large block expanding on type checking below now, but once the brain thinks it has what it was looking for, no further input is considered...
|
It is also possible to explicitly import the snakemake object in the script like ``from snakemake.script import snakemake`` to enable code completion, linting and type checking your python code in IDEs. |
Logs
Minimal example
Additional context
Snakemake version
9.20.0
Describe the bug
Currently, the docs on writing python scripts run via the
scriptdirective still advise on usingfrom snakemake.script import snakemaketo let type hintig tools know what the type of thesnakemakeobject used by the script is. This is however outdated since v9.17.0 (PR #4032), and has mislead me for quite a while. Yes, I see the large block expanding on type checking below now, but once the brain thinks it has what it was looking for, no further input is considered...snakemake/docs/snakefiles/rules.rst
Line 1486 in 384b4a3
Logs
Minimal example
Additional context