Click 6.7 and 7 compatibility

This commit is contained in:
Sean C. Gillies 2018-09-26 12:35:56 -06:00
parent 5cce8fb061
commit a04e25e930
5 changed files with 5 additions and 5 deletions

View File

@ -52,7 +52,7 @@ from rasterio.rio import options
"(use --bidx).")
@click.option('--subdatasets', 'meta_member', flag_value='subdatasets',
help="Print subdataset identifiers.")
@click.option('-v', '--tell-me-more', '--verbose', is_flag=True,
@click.option('-v', '--tell-me-more', '--verbose', 'verbose', is_flag=True,
help="Output extra information.")
@options.bidx_opt
@options.masked_opt

View File

@ -14,7 +14,7 @@ from rasterio.errors import DriverRegistrationError, RasterioIOError
prompt="Are you sure you want to delete the dataset?",
expose_value=True)
@click.option(
'-f', '--format', '--driver',
'-f', '--format', '--driver', 'driver',
help="Explicitly delete with this driver rather than probing for the "
"appropriate driver.")
def rm(path, yes, driver):

View File

@ -44,7 +44,7 @@ MAX_OUTPUT_HEIGHT = 100000
help="Determine output extent from source bounds: left bottom right top "
". Cannot be used with destination --bounds")
@click.option(
'--bounds', '--dst-bounds', nargs=4, type=float, default=None,
'--bounds', '--dst-bounds', 'dst_bounds', nargs=4, type=float, default=None,
help="Determine output extent from destination bounds: left bottom right top")
@options.resolution_opt
@click.option('--resampling',

View File

@ -147,7 +147,7 @@ def test_merge_error(test_data_dir_1):
runner = CliRunner()
result = runner.invoke(
main_group, ['merge'] + inputs + [outputname] + ['--nodata', '-1'])
assert result.exit_code == -1
assert result.exit_code
def test_merge_bidx(test_data_dir_3):

View File

@ -306,7 +306,7 @@ def test_rasterize_invalid_stdin(tmpdir, runner):
result = runner.invoke(
main_group, ['rasterize', output], input='BOGUS')
assert result.exit_code == -1
assert result.exit_code
def test_rasterize_invalid_geojson(tmpdir, runner):