Skip to content

Commit 7092266

Browse files
StaticRocketpraneethbajjuri
authored andcommitted
fix(scripts): invalid regex escape sequence
Regular expression was not using raw string. Fixes the following warning: SyntaxWarning: invalid escape sequence '\.' Signed-off-by: Randolph Sapp <[email protected]>
1 parent 9f7c537 commit 7092266

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/sectinc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def get_toctree_entries(app, toctreenodefile):
155155
rststring = rstfilelocation[0]
156156
if rststring:
157157
# Append the found .rst file to the toctreesections list
158-
toctreesections.append(re.sub('\.rst$', '', rststring))
158+
toctreesections.append(re.sub(r'\.rst$', '', rststring))
159159
else:
160160
print("TOC Tree Entry is not a defined .rst file in current directory")
161161

0 commit comments

Comments
 (0)