Skip to content

Commit 91c5ab3

Browse files
hetaozdhedvilme
andauthored
Update _sync_coordinator.py Comment simplified
Co-authored-by: Eduardo Villalpando Mello <eduardo.villalpando.mello@gmail.com>
1 parent 16ff1ec commit 91c5ab3

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

‎Lib/profiling/sampling/_sync_coordinator.py‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,7 @@ def _execute_script(script_path: str, script_args: List[str], cwd: str) -> None:
168168
if not os.path.isfile(script_path):
169169
raise TargetError(f"Script not found: {script_path}")
170170

171-
# gh-158540: ``python script.py`` puts the directory containing the
172-
# script (not the current working directory) on sys.path so that modules
173-
# next to the script can be imported. _setup_environment() added the
174-
# working directory for module (``-m``) imports; make the script's
175-
# directory importable as well.
171+
# Put directory containing the script (not the current working directory) on sys.path so that modules next to it can be imported. Similar to ``python script.py``
176172
script_dir = os.path.dirname(script_path)
177173
if script_dir not in sys.path:
178174
sys.path.insert(0, script_dir)

0 commit comments

Comments
 (0)