summaryrefslogtreecommitdiff
path: root/examples/validation
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2020-03-08 08:57:08 -0700
committerDavid Lord <davidism@gmail.com>2020-03-08 08:57:08 -0700
commit718485be48263056e7036ea9a60ce11b47e2fc26 (patch)
tree0fa1b49ed926f18ab3d247c2cacada892908123a /examples/validation
parentf8f02bfc63cb6e63b7a3373384758f7226553408 (diff)
downloadclick-718485be48263056e7036ea9a60ce11b47e2fc26.tar.gz
manual cleanup
Diffstat (limited to 'examples/validation')
-rw-r--r--examples/validation/validation.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/validation/validation.py b/examples/validation/validation.py
index 9abb125..c4f7352 100644
--- a/examples/validation/validation.py
+++ b/examples/validation/validation.py
@@ -20,8 +20,8 @@ class URL(click.ParamType):
value = urlparse.urlparse(value)
if value.scheme not in ("http", "https"):
self.fail(
- "invalid URL scheme (%s). Only HTTP URLs are "
- "allowed" % value.scheme,
+ "invalid URL scheme ({}). Only HTTP URLs are"
+ " allowed".format(value.scheme),
param,
ctx,
)
@@ -47,6 +47,6 @@ def cli(count, foo, url):
'If a value is provided it needs to be the value "wat".',
param_hint=["--foo"],
)
- click.echo("count: %s" % count)
- click.echo("foo: %s" % foo)
- click.echo("url: %s" % repr(url))
+ click.echo("count: {}".format(count))
+ click.echo("foo: {}".format(foo))
+ click.echo("url: {!r}".format(url))