10000 Use TypeError, not ValueError · winsmith/python-openapi-codec@e315530 · GitHub
[go: up one dir, main page]

Skip to content

Commit e315530

Browse files
committed
Use TypeError, not ValueError
1 parent e0a37a9 commit e315530

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openapi_codec/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ def decode(self, bytes, **options):
3232

3333
def encode(self, document, **options):
3434
if not isinstance(document, Document):
35-
raise ValueError('Expected a `coreapi.Document` instance')
35+
raise TypeError('Expected a `coreapi.Document` instance')
3636
data = generate_swagger_object(document)
3737
return force_bytes(json.dumps(data))

0 commit comments

Comments
 (0)
0