felix-hilden/sphinx-codeautolink

Provide a way to suppress some warnings

felix-hilden opened this issue · 2 comments

From #103: it could be annoying to deal with e.g. missing inventory warnings when a package and its documentation is out of your reach. But having warnings is still beneficial. I can see a couple of options that we could consider:

  • Provide a directive for suppressing warnings in a specific code example: this would mask other warnings in that code example though.
  • Provide configuration to disable extra warnings on intersphinx packages: this will surely mask lots of other warnings as well, and doesn't address the fact that you might not want to define a ref for each local module that can be imported.

Any other options? Personally I don't much care for either, but if I had to pick one it would be suppressing specific examples. At least that way people know that they might have problems and have more manual control over it.

A list of modules or prefixes for inventory items could work. So specifying library.foo would disable inventory warnings for either just that entry or alternatively everything under it.

Still not sure if it's worth to do this, but if we do, we might as well let the items be regexes so that people can disable exactly what they want and the logic on our end is simple.