0

I am testing VS code and I like it very much. But I have an issue with a Python module. The module is xspec (https://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/python/html/index.html). The issue is that VS code does not recognize the module, underlining in red all the functions.

This is probably because xspec needs to be initialized before using it. To inizialize it, an entire software has to be initialized (https://heasarc.gsfc.nasa.gov/docs/software/heasoft/). Basically, every time I need the xspec module I have to inizialized the heasoft sofwtware before running python, otherwise the module is not recognized.

There is a way to solve it? Or there is a way to add exceptions to the VS code highlining errors?

Alessandro Peca
  • 873
  • 1
  • 15
  • 40
  • What tool is flagging the module? Pylint or MPLS/"python"? You can definitely turn it off but the answer depends on what is triggering the warning. – Brett Cannon Jun 08 '20 at 23:01
  • The flagging is from Pylint. I would like to add exceptions for al the functions imported from the module `xspec`. Is this possible? – Alessandro Peca Jul 03 '20 at 17:20
  • I'm not sure if you can do it as a per-module thing. You could try marking just the import line with the ignore rule to see if that works. Otherwise you will have to dig into the Pylint docs to see if you can do what you want. – Brett Cannon Jul 13 '20 at 22:55

0 Answers0