Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/sage/misc/replace_dot_all.py: Use os.path.join more
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Jan 29, 2023
1 parent 23dff24 commit 568c538
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sage/misc/replace_dot_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def process_line(location, line, replacements, row_index, verbose=False):
EXAMPLES:
Replacing the first line which needs a replacement in the file with filepath ``src/sage/structure/element.pyx``::
Replacing the first line which needs a replacement in the source file with filepath ``src/sage/plot/arc.py``::
sage: from sage.misc.replace_dot_all import *
sage: location = os.path.join(sage.env.SAGE_SRC, 'sage/plot/arc.py')
Expand Down Expand Up @@ -389,7 +389,7 @@ def walkdir_replace_dot_all(dir, file_regex=r'.*[.](py|pyx|pxi)$', package_regex
EXAMPLES::
sage: from sage.misc.replace_dot_all import *
sage: walkdir_replace_dot_all(sage.env.SAGE_SRC + '/sage') # not tested
sage: walkdir_replace_dot_all(os.path.join(sage.env.SAGE_SRC, 'sage')) # not tested
"""
global numberFiles, numberFilesMatchingRegex
file_regex = re.compile(file_regex)
Expand Down Expand Up @@ -427,7 +427,7 @@ def walkdir_replace_dot_all(dir, file_regex=r'.*[.](py|pyx|pxi)$', package_regex
package_regex = None
# Execute the main function based on the specified location and verbosity
if not args.location:
args.location = [sage.env.SAGE_SRC + '/sage']
args.location = [os.path.join(sage.env.SAGE_SRC, 'sage')]
try:
for location in args.location:
if not (location.endswith('.py') or location.endswith('.pxi')):
Expand Down

0 comments on commit 568c538

Please sign in to comment.