diff --git a/tools/chplcheck/src/driver.py b/tools/chplcheck/src/driver.py index a986127bd42..0514ff02be6 100644 --- a/tools/chplcheck/src/driver.py +++ b/tools/chplcheck/src/driver.py @@ -75,9 +75,7 @@ def rules_and_descriptions(self): for rule in itertools.chain( self.BasicRules, self.AdvancedRules, self.LocationRules ): - doc = rule.check_func.__doc__ - if doc is None: - doc = "" + doc = rule.check_func.__doc__ or "" # if there is an escaped underscore, remove the escape doc = doc.replace("\\_", "_")