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

Fix issue with warnings without subtype being incorrectly suppressed #9656

Merged
merged 1 commit into from Oct 31, 2021
Merged

Fix issue with warnings without subtype being incorrectly suppressed #9656

merged 1 commit into from Oct 31, 2021

Conversation

sdhiscocks
Copy link
Contributor

Feature or Bugfix

Bugfix

Purpose

This fixes an issue with warnings that have been raised with no subtype being suppressed if a suppress warnings value with a subtype has been set. e.g. all autodoc warnings should not be suppressed if autodoc.import_object is only set to be suppressed.

Detail

This issue occurred as logic previously only checked if error subtype was None, without checking that the subtarget was also None.

Relates

Noticed this issue when looking at #9655

This fixes an issue with warnings that have been raised with no subtype
being suppressed if a suppress warnings value with a subtype has been set.
e.g. all `autodoc` warnings should not be suppressed if
`autodoc.import_object` is only set to be suppressed.
@tk0miya tk0miya added this to the 4.3.0 milestone Oct 31, 2021
@tk0miya tk0miya merged commit 4475dab into sphinx-doc:4.x Oct 31, 2021
@tk0miya
Copy link
Member

tk0miya commented Oct 31, 2021

Thank you for your contribution!

tk0miya added a commit to tk0miya/sphinx that referenced this pull request Oct 31, 2021
@sdhiscocks sdhiscocks deleted the suppress_warning_subtype_none branch November 1, 2021 08:04
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants