From 502647f7583be626319482adf4ea3d905db0006d Mon Sep 17 00:00:00 2001 From: Krzysztof Gogolewski Date: Sat, 13 Jun 2020 15:46:50 +0200 Subject: Fix "ndecreasingIndentation" in manual (#18116) --- docs/users_guide/flags.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/users_guide/flags.py b/docs/users_guide/flags.py index fb4592a2b2..2f0bda23b9 100644 --- a/docs/users_guide/flags.py +++ b/docs/users_guide/flags.py @@ -255,14 +255,16 @@ class LanguageExtension(GenericFlag): # Invert the flag @staticmethod def _noname(name): - if name[:2] == "No": + # We check isupper() so that NondecreasingIndentation + # is not counted as "No-decreasingIndentation" + if name[:2] == "No" and name[2].isupper(): return name[2:] else: return "No%s" % name @staticmethod def _onname(name): - if name[:2] == "No": + if name[:2] == "No" and name[2].isupper(): return name[2:] else: return name -- cgit v1.2.1