Skip to content

Commit

Permalink
Rename "no-trusted-host" to "no-emit-trusted-host"
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyseek committed Feb 25, 2017
1 parent 896264d commit d7ed6d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions piptools/scripts/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class PipCommand(pip.basecommand.Command):
help="Add header to generated file")
@click.option('--index/--no-index', is_flag=True, default=True,
help="Add index URL to generated file")
@click.option('--emit-trusted-host/--no-trusted-host', is_flag=True, default=True,
help="Add trusted host option to generated file")
@click.option('--emit-trusted-host/--no-emit-trusted-host', is_flag=True,
default=True, help="Add trusted host option to generated file")
@click.option('--annotate/--no-annotate', is_flag=True, default=True,
help="Annotate results, indicating where dependencies come from")
@click.option('-U', '--upgrade', is_flag=True, default=False,
Expand Down
2 changes: 1 addition & 1 deletion piptools/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def write_header(self):
if not self.emit_index:
params += ['--no-index']
if not self.emit_trusted_host:
params += ['--no-trusted-host']
params += ['--no-emit-trusted-host']
if not self.annotate:
params += ['--no-annotate']
if self.generate_hashes:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_trusted_host_no_emit(pip_conf):
open('requirements.in', 'w').close()
out = runner.invoke(cli, ['-v',
'--trusted-host', 'example.com',
'--no-trusted-host'])
'--no-emit-trusted-host'])
print(out.output)
assert '--trusted-host example.com' not in out.output
assert '--no-trusted-host' in out.output
assert '--no-emit-trusted-host' in out.output

0 comments on commit d7ed6d5

Please sign in to comment.