summaryrefslogtreecommitdiff
path: root/sphinx/util/logging.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2022-01-12 02:34:21 +0900
committerGitHub <noreply@github.com>2022-01-12 02:34:21 +0900
commit2b784e23d8341b4e4ef551a8f8d23a1aad822805 (patch)
tree5cf2623c491a68969b15b8de58ce72dab848048b /sphinx/util/logging.py
parent726f2eaa9750bd0bc635222a6aeeb77849a879fb (diff)
parente51591d061a9795663f1c382799dfe9e40cadefe (diff)
downloadsphinx-git-2b784e23d8341b4e4ef551a8f8d23a1aad822805.tar.gz
Merge pull request #10080 from danieleades/refactor/simplify-set-comparison
simplify some set comparisons (SIM109)
Diffstat (limited to 'sphinx/util/logging.py')
-rw-r--r--sphinx/util/logging.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/sphinx/util/logging.py b/sphinx/util/logging.py
index bcf8bf63d..7294885b5 100644
--- a/sphinx/util/logging.py
+++ b/sphinx/util/logging.py
@@ -375,12 +375,8 @@ def is_suppressed_warning(type: str, subtype: str, suppress_warnings: List[str])
else:
target, subtarget = warning_type, None
- if target == type:
- if ((subtype is None and subtarget is None) or
- subtarget is None or
- subtarget == subtype or
- subtarget == '*'):
- return True
+ if target == type and subtarget in (None, subtype, "*"):
+ return True
return False