Skip to content

Commit

Permalink
remove terminaltables
Browse files Browse the repository at this point in the history
  • Loading branch information
guyskk committed Dec 13, 2023
1 parent 2af42b4 commit 16a7216
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def _read_file(filepath):
install_requires=[
'idna>=2.5',
'pyparsing>=2.1.0',
'terminaltables>=3.1.0',
],
zip_safe=False,
classifiers=[
Expand Down
10 changes: 4 additions & 6 deletions src/validr/_exception_c.pyx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from terminaltables import AsciiTable


_NOT_SET = object()


Expand Down Expand Up @@ -128,9 +125,10 @@ class ModelInvalid(Invalid):
super().__init__(message)

def __str__(self):
error_items = [(ex.position, ex.message) for ex in self.errors]
table = [("Key", "Error")] + error_items
return '\n' + AsciiTable(table).table
error_line_s = []
for ex in self.errors:
error_line_s.append('{} is {}'.format(ex.position, ex.message))
return '; '.join(error_line_s)


class SchemaError(ValidrError):
Expand Down

0 comments on commit 16a7216

Please sign in to comment.