Fixing merge conflicts.

This commit is contained in:
Nanda Scott 2018-02-16 19:32:14 -05:00
commit 667cd0d3bb
1 changed files with 8 additions and 8 deletions

View File

@ -40,48 +40,48 @@ class RulingsObject(object):
def object(self): def object(self):
if self.__checkForKey('object') is None: if self.__checkForKey('object') is None:
return KeyError('This object has no key \'object\'') raise KeyError('This object has no key \'object\'')
return self.scryfallJson['object'] return self.scryfallJson['object']
def has_more(self): def has_more(self):
if self.__checkForKey('has_more') is None: if self.__checkForKey('has_more') is None:
return KeyError('This object has no key \'has_more\'') raise KeyError('This object has no key \'has_more\'')
return self.scryfallJson['has_more'] return self.scryfallJson['has_more']
def data(self): def data(self):
if self.__checkForKey('data') is None: if self.__checkForKey('data') is None:
return KeyError('This object has no key \'data\'') raise KeyError('This object has no key \'data\'')
return self.scryfallJson['data'] return self.scryfallJson['data']
def data_length(self): def data_length(self):
if self.__checkForKey('data') is None: if self.__checkForKey('data') is None:
return KeyError('This object has no key \'data\'') raise KeyError('This object has no key \'data\'')
return len(self.scryfallJson['data']) return len(self.scryfallJson['data'])
def ruling_object(self, num): def ruling_object(self, num):
if self.__checkForTupleKey('data', num, 'object') is None: if self.__checkForTupleKey('data', num, 'object') is None:
return KeyError('This ruling has no key \'object\'') raise KeyError('This ruling has no key \'object\'')
return self.scryfallJson['data'][num]['object'] return self.scryfallJson['data'][num]['object']
def ruling_source(self, num): def ruling_source(self, num):
if self.__checkForTupleKey('data', num, 'source') is None: if self.__checkForTupleKey('data', num, 'source') is None:
return KeyError('This ruling has no key \'source\'') raise KeyError('This ruling has no key \'source\'')
return self.scryfallJson['data'][num]['source'] return self.scryfallJson['data'][num]['source']
def ruling_published_at(self, num): def ruling_published_at(self, num):
if self.__checkForTupleKey('data', num, 'published_at') is None: if self.__checkForTupleKey('data', num, 'published_at') is None:
return KeyError('This ruling has no key \'published_at\'') raise KeyError('This ruling has no key \'published_at\'')
return self.scryfallJson['data'][num]['published_at'] return self.scryfallJson['data'][num]['published_at']
def ruling_comment(self, num): def ruling_comment(self, num):
if self.__checkForTupleKey('data', num, 'comment') is None: if self.__checkForTupleKey('data', num, 'comment') is None:
return KeyError('This ruling has no key \'comment\'') raise KeyError('This ruling has no key \'comment\'')
return self.scryfallJson['data'][num]['comment'] return self.scryfallJson['data'][num]['comment']