Skip to content

Commit 6abc164

Browse files
committed
Revert "Merge pull request #25 from lyang/patch-1"
This reverts commit c8813cb, reversing changes made to b36c12b.
1 parent 22c5892 commit 6abc164

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

openapi_schema_validator/validators.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from attr import attrib, attrs
21
from copy import deepcopy
32

43
from jsonschema import _legacy_validators, _utils, _validators
@@ -57,11 +56,12 @@
5756
)
5857

5958

60-
@attrs
6159
class OAS30Validator(BaseOAS30Validator):
6260

63-
read: bool = attrib(default=None)
64-
write: bool = attrib(default=None)
61+
def __init__(self, *args, **kwargs):
62+
self.read = kwargs.pop('read', None)
63+
self.write = kwargs.pop('write', None)
64+
super(OAS30Validator, self).__init__(*args, **kwargs)
6565

6666
def iter_errors(self, instance, _schema=None):
6767
if _schema is None:
@@ -74,5 +74,4 @@ def iter_errors(self, instance, _schema=None):
7474
'nullable': False,
7575
})
7676

77-
validator = self.evolve(schema=_schema)
78-
return super(OAS30Validator, validator).iter_errors(instance)
77+
return super(OAS30Validator, self).iter_errors(instance, _schema)

poetry.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ classifiers = [
3333

3434
[tool.poetry.dependencies]
3535
python = "^3.6.2"
36-
jsonschema = "^4.0.0"
36+
jsonschema = "*"
3737
rfc3339-validator = {version = "*", optional = true}
3838
strict-rfc3339 = {version = "*", optional = true}
3939
isodate = {version = "*", optional = true}
40-
attrs = ">=19.2.0"
4140

4241
[tool.poetry.extras]
4342
rfc3339-validator = ["rfc3339-validator"]

0 commit comments

Comments
 (0)