Skip to content

Commit

Permalink
Dependency python-intervals was renamed to portion. (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
hirzel committed Apr 20, 2021
1 parent 3feb8f6 commit fe91e48
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions jsonsubschema/_checkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import math
import sys

import intervals as I
import portion as I
from greenery.lego import parse

import jsonsubschema.config as config
Expand Down Expand Up @@ -434,7 +434,7 @@ def __init__(self, s):
self.multipleOf = self.get("multipleOf", None)

def _isUninhabited(self):
return self.interval.is_empty() \
return self.interval.empty \
or utils.is_num(self.multipleOf) and self.multipleOf > self.maximum

def updateInternalState(self):
Expand Down Expand Up @@ -581,7 +581,7 @@ def _isSubtype_nonTrivial(self, s):
for j in list(intervals):
if utils.are_intervals_mergable(num_schema.interval, j):
intervals.remove(j)
intervals.append((num_schema.interval | j).to_atomic())
intervals.append((num_schema.interval | j).enclosure)
added = True
if not added:
intervals.append(num_schema.interval)
Expand Down
2 changes: 1 addition & 1 deletion jsonsubschema/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import json

import jsonschema
import intervals as I
import portion as I
from greenery.lego import parse

import jsonsubschema.config as config
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
url='https://github.com/IBM/jsonsubschema',
packages=['jsonsubschema', ],
license='Apache License 2.0',
install_requires=['python-intervals', 'greenery', 'jsonschema', 'jsonref'],
install_requires=['portion', 'greenery', 'jsonschema', 'jsonref'],
entry_points={
'console_scripts': 'jsonsubschema=jsonsubschema.cli:main'
}
Expand Down

0 comments on commit fe91e48

Please sign in to comment.