MCPcopy Create free account
hub / github.com/theskumar/python-dotenv / unset

Function unset

src/dotenv/cli.py:128–136  ·  view source on GitHub ↗

Removes the given key.

(ctx: click.Context, key: Any)

Source from the content-addressed store, hash-verified

126@click.pass_context
127@click.argument('key', required=True)
128def unset(ctx: click.Context, key: Any) -> None:
129 """Removes the given key."""
130 file = ctx.obj['FILE']
131 quote = ctx.obj['QUOTE']
132 success, key = unset_key(file, key, quote)
133 if success:
134 click.echo(f"Successfully removed {key}")
135 else:
136 exit(1)
137
138
139@cli.command(context_settings={'ignore_unknown_options': True})

Callers

nothing calls this directly

Calls 1

unset_keyFunction · 0.85

Tested by

no test coverage detected