Skip to content

Commit fd5de14

Browse files
committed
And a linter to forbid slash-line-continuation.
1 parent 8695165 commit fd5de14

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

jsonschema/_validators.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ def items(validator, items, instance, schema):
8080
"%r has more items than defined in prefixItems" % instance,
8181
)
8282
else:
83-
non_prefixed_items = instance[len(schema["prefixItems"]):] \
83+
non_prefixed_items = (
84+
instance[len(schema["prefixItems"]):]
8485
if "prefixItems" in schema else instance
86+
)
8587

8688
for index, item in enumerate(non_prefixed_items):
8789
for error in validator.descend(item, items, path=index):

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ deps =
8585
flake8
8686
flake8-commas
8787
flake8-quotes
88+
flake8-broken-line
8889
commands =
8990
{envpython} -m flake8 {posargs} {toxinidir}/jsonschema {toxinidir}/docs
9091

0 commit comments

Comments
 (0)