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
Hey there,
Huge thanks to you all for getting the language server working properly in the VSCode extension.
One recurring issue is that the linter thinks a process variable is not used, when it is used in a template.
I like to make my python template scripts reusable, so I use a pattern of injecting arguments into template like this as command line arguments, e.g. templates/foo.py
#!/usr/bin/env pythonfromargparseimportArgumentParserimportshlexdefget_parser() ->ArgumentParser:
...
argv=sys.argviflen(sys.argv) ==1:
# is being called directly from nextflow, use argv from parsing argstrargv=shlex.split("${argstr}")
args=get_parser().parse_args(argv)
...
Hey there,
Huge thanks to you all for getting the language server working properly in the VSCode extension.
One recurring issue is that the linter thinks a process variable is not used, when it is used in a template.
I like to make my python template scripts reusable, so I use a pattern of injecting arguments into template like this as command line arguments, e.g.
templates/foo.py
In this example, the linter has a problem with
argstr
, "Variable was declared but not used", despite it being used in the template.I can think of three ways around this:
//noqa
(sounds feasible, could be broadly applicable to other issues)script:
andtemplate
(easy but blunt hack)Thanks
The text was updated successfully, but these errors were encountered: