Skip to content

Commit 568c538

Browse files
author
Matthias Koeppe
committed
src/sage/misc/replace_dot_all.py: Use os.path.join more
1 parent 23dff24 commit 568c538

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sage/misc/replace_dot_all.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def process_line(location, line, replacements, row_index, verbose=False):
282282
283283
EXAMPLES:
284284
285-
Replacing the first line which needs a replacement in the file with filepath ``src/sage/structure/element.pyx``::
285+
Replacing the first line which needs a replacement in the source file with filepath ``src/sage/plot/arc.py``::
286286
287287
sage: from sage.misc.replace_dot_all import *
288288
sage: location = os.path.join(sage.env.SAGE_SRC, 'sage/plot/arc.py')
@@ -389,7 +389,7 @@ def walkdir_replace_dot_all(dir, file_regex=r'.*[.](py|pyx|pxi)$', package_regex
389389
EXAMPLES::
390390
391391
sage: from sage.misc.replace_dot_all import *
392-
sage: walkdir_replace_dot_all(sage.env.SAGE_SRC + '/sage') # not tested
392+
sage: walkdir_replace_dot_all(os.path.join(sage.env.SAGE_SRC, 'sage')) # not tested
393393
"""
394394
global numberFiles, numberFilesMatchingRegex
395395
file_regex = re.compile(file_regex)
@@ -427,7 +427,7 @@ def walkdir_replace_dot_all(dir, file_regex=r'.*[.](py|pyx|pxi)$', package_regex
427427
package_regex = None
428428
# Execute the main function based on the specified location and verbosity
429429
if not args.location:
430-
args.location = [sage.env.SAGE_SRC + '/sage']
430+
args.location = [os.path.join(sage.env.SAGE_SRC, 'sage')]
431431
try:
432432
for location in args.location:
433433
if not (location.endswith('.py') or location.endswith('.pxi')):

0 commit comments

Comments
 (0)