mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Fix FutureWarning related to nested sets.
See https://bugs.python.org/issue30349
This commit is contained in:
parent
2c7c83b07d
commit
fcf30a5601
@ -292,7 +292,7 @@ class ChannelStats(callbacks.Plugin):
|
||||
name, channel))
|
||||
stats = wrap(stats, ['channeldb', additional('something')])
|
||||
|
||||
_calc_match_forbidden_chars = re.compile('[_[\]]')
|
||||
_calc_match_forbidden_chars = re.compile('[_\[\]]')
|
||||
_env = {'__builtins__': types.ModuleType('__builtins__')}
|
||||
_env.update(math.__dict__)
|
||||
def _factorial(x):
|
||||
|
@ -157,7 +157,7 @@ class Math(callbacks.Plugin):
|
||||
else:
|
||||
return '%s%s' % (realS, imagS)
|
||||
|
||||
_calc_match_forbidden_chars = re.compile('[_[\]]')
|
||||
_calc_match_forbidden_chars = re.compile('[_\[\]]')
|
||||
_calc_remover = utils.str.MultipleRemover('_[] \t')
|
||||
###
|
||||
# So this is how the 'calc' command works:
|
||||
|
@ -151,7 +151,7 @@ class Nickometer(callbacks.Plugin):
|
||||
nickInitial = nick
|
||||
nick=re.sub('^([^()]*)(\()(.*)(\))([^()]*)$', '\1\3\5', nick, 1)
|
||||
nick=re.sub('^([^{}]*)(\{)(.*)(\})([^{}]*)$', '\1\3\5', nick, 1)
|
||||
nick=re.sub('^([^[\]]*)(\[)(.*)(\])([^[\]]*)$', '\1\3\5', nick, 1)
|
||||
nick=re.sub('^([^\[\]]*)(\[)(.*)(\])([^\[\]]*)$', '\1\3\5', nick, 1)
|
||||
if nick == nickInitial:
|
||||
break
|
||||
self.log.debug('Removed some matching brackets %r => %r',
|
||||
|
@ -181,7 +181,7 @@ def _hostmaskPatternEqual(pattern, hostmask):
|
||||
elif c == '?':
|
||||
fd.write('.')
|
||||
elif c in '[{':
|
||||
fd.write('[[{]')
|
||||
fd.write(r'[\[{]')
|
||||
elif c in '}]':
|
||||
fd.write(r'[}\]]')
|
||||
elif c in '|\\':
|
||||
|
Loading…
Reference in New Issue
Block a user