Skip to content

Commit 1db81c2

Browse files
committed
--base-uri flag instead -r
1 parent 6f2ffef commit 1db81c2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

jsonschema/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def _namedAnyWithDefault(name):
180180
""",
181181
)
182182
parser.add_argument(
183-
"-r", "--local-ref",
183+
"--base-uri",
184184
action="store_true",
185185
help="""
186186
use this option to indicate that the schema contains some references
@@ -261,7 +261,7 @@ def load(_):
261261
raise _CannotLoadFile()
262262
instances = ["<stdin>"]
263263

264-
if arguments["local_ref"]:
264+
if arguments["base_uri"]:
265265
file_prefix = "file:///{}/" if "nt" == os.name else "file://{}/"
266266
schema_dirname = os.path.dirname(arguments["schema"])
267267
resolver = RefResolver(

jsonschema/tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ def test_successful_validation_with_specifying_base_uri(self):
694694
fp.close()
695695
self.assertOutputs(
696696
files=dict(some_schema=schema, some_instance='{"KEY1": "1"}'),
697-
argv=["-i", "some_instance", "-r", "some_schema"],
697+
argv=["-i", "some_instance", "--base-uri", "some_schema"],
698698
stdout="",
699699
stderr="",
700700
)

0 commit comments

Comments
 (0)