Skip to content

Commit f2df6a6

Browse files
committed
Additional minor changes
1 parent 6fa70f4 commit f2df6a6

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

Doc/library/site.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ Module contents
424424
<site-pth-files>`).
425425

426426
This method is not idempotent and must not be called more than once
427-
on the same instance. Doing so would apply the accumulated state
427+
on the same instance. Doing so will apply the accumulated state
428428
more than once, re-running entry points and ``import`` lines.
429429

430430

Lib/site.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -993,11 +993,15 @@ def _venv(state):
993993
sys._home = value
994994

995995
if sys.prefix != site_prefix:
996-
_warn(f'Unexpected value in sys.prefix, expected {site_prefix}, got {sys.prefix}', RuntimeWarning)
996+
_warn(
997+
f'Unexpected value in sys.prefix, expected {site_prefix}, got {sys.prefix}',
998+
RuntimeWarning)
997999
if sys.exec_prefix != site_prefix:
998-
_warn(f'Unexpected value in sys.exec_prefix, expected {site_prefix}, got {sys.exec_prefix}', RuntimeWarning)
1000+
_warn(
1001+
f'Unexpected value in sys.exec_prefix, expected {site_prefix}, got {sys.exec_prefix}',
1002+
RuntimeWarning)
9991003

1000-
# Doing this here ensures venv takes precedence over user-site
1004+
# Doing this here ensures venv takes precedence over user-site.
10011005
state.addsitepackages([sys.prefix])
10021006

10031007
if system_site == "true":
@@ -1063,8 +1067,10 @@ def main():
10631067

10641068
state = StartupState(set())
10651069
_venv(state)
1070+
10661071
if ENABLE_USER_SITE is None:
10671072
ENABLE_USER_SITE = check_enableusersite()
1073+
10681074
state.addusersitepackages()
10691075
state.addsitepackages()
10701076
# PEP 829: flush accumulated data from all .pth and .start files.

0 commit comments

Comments
 (0)