Skip to content

Commit a4f4854

Browse files
committed
Minor style.
1 parent d95ff09 commit a4f4854

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

bowtie/_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ def convert(
761761

762762
def _set_dialect(ctx: click.Context, _, value: _Dialect):
763763
"""
764-
Sets the dialect according to $schema if specified.
764+
Set the dialect according to a possibly present :kw:`$schema` keyword.
765765
"""
766766
if value:
767767
return value

tests/test_integration.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2113,8 +2113,8 @@ async def test_validate_set_dialect_from_schema(envsonschema, tmp_path):
21132113
tmp_path / "schema.json",
21142114
tmp_path / "instance.json",
21152115
)
2116-
dialect = _json.loads(stdout.split("\n")[0])["dialect"]
2117-
assert dialect == "https://json-schema.org/draft/2019-09/schema", stderr
2116+
report = Report.from_serialized(stdout.splitlines())
2117+
assert report.metadata.dialect == Dialect.by_short_name()["draft2019-09"]
21182118

21192119

21202120
@pytest.mark.asyncio
@@ -2124,7 +2124,7 @@ async def test_validate_specify_dialect(envsonschema, tmp_path):
21242124
)
21252125
tmp_path.joinpath("instance.json").write_text("12")
21262126

2127-
stdout, _ = await bowtie(
2127+
stdout, stderr = await bowtie(
21282128
"validate",
21292129
"-i",
21302130
envsonschema,
@@ -2133,5 +2133,5 @@ async def test_validate_specify_dialect(envsonschema, tmp_path):
21332133
tmp_path / "schema.json",
21342134
tmp_path / "instance.json",
21352135
)
2136-
dialect = _json.loads(stdout.split("\n")[0])["dialect"]
2137-
assert dialect == "https://json-schema.org/draft/2019-09/schema"
2136+
report = Report.from_serialized(stdout.splitlines())
2137+
assert report.metadata.dialect == Dialect.by_short_name()["draft2019-09"]

0 commit comments

Comments
 (0)