MCPcopy Index your code
hub / github.com/theskumar/python-dotenv / unset

Function unset

src/dotenv/cli.py:154–167  ·  view source on GitHub ↗

Removes the given key. This doesn't follow symlinks, to avoid accidentally modifying a file at a potentially untrusted path.

(ctx: click.Context, key: Any)

Source from the content-addressed store, hash-verified

152@click.pass_context
153@click.argument("key", required=True)
154def unset(ctx: click.Context, key: Any) -> None:
155 """
156 Removes the given key.
157
158 This doesn't follow symlinks, to avoid accidentally modifying a file at a
159 potentially untrusted path.
160 """
161 file = ctx.obj["FILE"]
162 quote = ctx.obj["QUOTE"]
163 success, key = unset_key(file, key, quote)
164 if success:
165 click.echo(f"Successfully removed {key}")
166 else:
167 sys.exit(1)
168
169
170@cli.command(

Callers

nothing calls this directly

Calls 1

unset_keyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…