1515class Snapshot (Enum ):
1616 """Snapshot modes accepted by ``conda self reset --snapshot``.
1717
18- Plain :class:`enum.Enum` for Python 3.10 compatibility; the string values
18+ Plain :class:`enum.Enum` for Python 3.10 compatibility. The string values
1919 double as argparse choices and user-facing mode names. Switch to
2020 :class:`enum.StrEnum` when 3.11 becomes the minimum supported version
2121 (mirrors the TODO on conda's ``EnvironmentFormat``).
@@ -46,7 +46,7 @@ def file_path(self) -> Path | None:
4646 return None
4747
4848
49- # Tried in order when --snapshot is not provided; the first mode whose file
49+ # Tried in order when --snapshot is not provided. The first mode whose file
5050# exists on disk wins, otherwise we fall through to CURRENT.
5151FALLBACK_ORDER : tuple [Snapshot , ...] = (
5252 Snapshot .BASE_PROTECTION ,
@@ -58,15 +58,16 @@ def file_path(self) -> Path | None:
5858SNAPSHOT_HELP = dedent (
5959 """
6060 Reset mode for the base environment.
61- `current` removes all packages except for `conda`, `conda-self`, installed
62- conda plugins, configured permanent packages, and their dependencies.
63- `installer` restores the exact packages recorded by the installer and
64- may downgrade updated packages. `installer-exact` is equivalent.
61+ `current` removes all conda packages except for `conda`, `conda-self`,
62+ installed conda plugins, configured permanent packages, and their
63+ dependencies.
64+ `installer` restores exactly the conda packages recorded by the installer
65+ and may downgrade updated packages. `installer-exact` is equivalent.
6566 `installer-updated` retains the packages kept by `current` and currently
66- installed packages whose names appear in the installer snapshot. It does
67- not update packages or install missing packages.
68- `base-protection` restores the exact packages recorded by
69- `conda doctor base-protection --fix` before protecting base.
67+ installed conda packages whose names appear in the installer snapshot. It
68+ does not update packages or install missing packages.
69+ `base-protection` restores exactly the conda packages recorded by
70+ `conda doctor -n base base-protection --fix` before protecting base.
7071
7172 If not set, `conda self` selects `base-protection` when its snapshot file
7273 exists, otherwise `installer-updated` when the installer snapshot file
@@ -78,13 +79,13 @@ def file_path(self) -> Path | None:
7879 """
7980 This resets the base environment to keep conda, conda-self, installed conda
8081 plugins, configured permanent packages, and their dependencies.
81- All other packages are removed.
82+ All other conda packages are removed.
8283 """
8384).lstrip ()
8485WHAT_TO_EXPECT_SNAPSHOT = dedent (
8586 """
8687 This resets the base environment using the '{mode_name}' mode
87- and removes packages not retained by that mode.
88+ and removes conda packages not retained by that mode.
8889 """
8990).lstrip ()
9091SUCCESS = "Reset the base environment using the 'current' mode.\n "
@@ -128,7 +129,7 @@ def execute(args: argparse.Namespace) -> int:
128129
129130 if reset_file is not None and not reset_file .exists ():
130131 raise FileNotFoundError (
131- f"Failed to reset to '{ snapshot } '. \n Required file { reset_file } not found. "
132+ f"Snapshot file for the '{ snapshot } ' reset mode not found: { reset_file } "
132133 )
133134
134135 if not context .json and not context .quiet :
0 commit comments