vscode-ruff icon indicating copy to clipboard operation
vscode-ruff copied to clipboard

Support for `jupyter.runStartupCommands`

Open indrex opened this issue 1 year ago • 1 comments

Environment:

  • VSCode (latest)
  • Jupyter and ruff extensions

Issue:

  • Jupyter allows some commands to be run at startup
  • This can be tested using jupyter.runStartupCommands in VSCode settings
  • If I import a module using this, it is not recognized by ruff
  • It lints the import wondering where did it come from

Expected resolution:

  • Look at the auto imports, or the available namespace variables
  • Allow a setting to let ruff know of such imports?

Example: import pandas as pd is run at startup image

indrex avatar Dec 21 '23 09:12 indrex

Related: https://github.com/astral-sh/ruff/issues/9644

dhruvmanila avatar Feb 18 '24 06:02 dhruvmanila