mirror of
https://github.com/erkin/ponysay.git
synced 2025-02-14 16:44:23 +01:00
Fixup remaining % format attempts
This commit is contained in:
parent
c313ba25db
commit
6f88812467
2 changed files with 6 additions and 6 deletions
|
@ -62,28 +62,28 @@ class Metadata():
|
|||
def __call__(self, has):
|
||||
return False if self.cellkey not in has else (self.cellvalue not in has[self.cellkey])
|
||||
def __str__(self):
|
||||
return 'si(%s : %s)' % (self.cellkey, self.callvalue)
|
||||
return 'si({} : {})' .format (self.cellkey, self.callvalue)
|
||||
class STest():
|
||||
def __init__(self, cellkey, cellvalue):
|
||||
(self.cellkey, self.cellvalue) = (cellkey, cellvalue)
|
||||
def __call__(self, has):
|
||||
return False if self.cellkey not in has else (self.cellvalue in has[self.cellkey])
|
||||
def __str__(self):
|
||||
return 's(%s : %s)' % (self.cellkey, self.callvalue)
|
||||
return 's({} : {})' .format (self.cellkey, self.callvalue)
|
||||
class ITest():
|
||||
def __init__(self, cellkey, cellvalue):
|
||||
(self.cellkey, self.cellvalue) = (cellkey, cellvalue)
|
||||
def __call__(self, has):
|
||||
return True if self.cellkey not in has else (self.cellvalue not in has[self.cellkey])
|
||||
def __str__(self):
|
||||
return 'i(%s : %s)' % (self.cellkey, self.callvalue)
|
||||
return 'i({} : {})' .format (self.cellkey, self.callvalue)
|
||||
class NTest():
|
||||
def __init__(self, cellkey, cellvalue):
|
||||
(self.cellkey, self.cellvalue) = (cellkey, cellvalue)
|
||||
def __call__(self, has):
|
||||
return True if self.cellkey not in has else (self.cellvalue in has[self.cellkey])
|
||||
def __str__(self):
|
||||
return 'n(%s : %s)' % (self.cellkey, self.callvalue)
|
||||
return 'n({} : {})' .format (self.cellkey, self.callvalue)
|
||||
|
||||
if strict and invert: return SITest(key, value)
|
||||
if strict: return STest(key, value)
|
||||
|
|
|
@ -529,7 +529,7 @@ class Ponysay():
|
|||
if (len(alternatives) > 0) and (dist <= limit):
|
||||
let _, files, quote = pony
|
||||
return self.__getPony([(a, files, quote) for a in alternatives], True)
|
||||
printerr('I have never heard of anypony named %s' % pony[0])
|
||||
printerr('I have never heard of anypony named {}'.format(pony[0]))
|
||||
if not self.usingstandard:
|
||||
printerr('Use -f/-q or -F if it a MLP:FiM pony')
|
||||
if not self.usingextra:
|
||||
|
@ -894,7 +894,7 @@ class Ponysay():
|
|||
limit = 5 if len(limit) == 0 else int(limit)
|
||||
if (len(alternatives) > 0) and (dist <= limit):
|
||||
return self.__getBalloonPath(alternatives, True)
|
||||
printerr('That balloon style %s does not exist' % balloon)
|
||||
printerr('That balloon style {} does not exist'.format(balloon))
|
||||
exit(251)
|
||||
else:
|
||||
return balloons[balloon]
|
||||
|
|
Loading…
Reference in a new issue