Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow suppressing warnings #432

Open
aeisenbarth opened this issue Mar 4, 2024 · 0 comments
Open

Allow suppressing warnings #432

aeisenbarth opened this issue Mar 4, 2024 · 0 comments

Comments

@aeisenbarth
Copy link

It would be great being able to ignore warnings like WARNING: Cannot resolve forward reference in type annotations of
(In reference to sphinx-doc/sphinx#10219 (comment))

The reason is that some warnings are due to limited capabilities of the extension, and cannot always be resolved with reasonable effort. I would think (sarcastically), "if you can't support a feature reliably, don't implement it". Practically, I would interpret that as make such features optional or their warnings silenceable.

This is relevant because when users are flooded with hundreds of irrelevant warnings, they cannot detect and resolve relevant warnings. They can also not turn warnings into errors to enforce fixing them.

I had no success using Python's standard warnings filter mechanism (Sphinx warnings seem not accessible by it).
Inspite of extensions not being covered by default by suppress_warnings (sphinx-doc/sphinx#10219), autodoc is able to provide custom warning types autodoc, autodoc.import_object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant