Skip to content

Commit

Permalink
cleanup strip code
Browse files Browse the repository at this point in the history
Signed-off-by: Jade Abraham <[email protected]>
  • Loading branch information
jabraham17 committed Nov 5, 2024
1 parent 2173b96 commit 2de10a6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tools/chplcheck/src/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,10 @@ def rules_and_descriptions(self):
to_return = {}

for rule in itertools.chain(self.BasicRules, self.AdvancedRules):
doc = rule.check_func.__doc__
if doc is None:
doc = ""
doc = rule.check_func.__doc__ or ""

# keep only the first line of the doc
doc = doc.strip().split("\n")[0]

# if there is an escaped underscore, remove the escape
doc = doc.replace("\\_", "_")

Expand Down

0 comments on commit 2de10a6

Please sign in to comment.