mirror of
https://github.com/progval/Limnoria.git
synced 2025-04-26 04:51:06 -05: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))
|
name, channel))
|
||||||
stats = wrap(stats, ['channeldb', additional('something')])
|
stats = wrap(stats, ['channeldb', additional('something')])
|
||||||
|
|
||||||
_calc_match_forbidden_chars = re.compile('[_[\]]')
|
_calc_match_forbidden_chars = re.compile('[_\[\]]')
|
||||||
_env = {'__builtins__': types.ModuleType('__builtins__')}
|
_env = {'__builtins__': types.ModuleType('__builtins__')}
|
||||||
_env.update(math.__dict__)
|
_env.update(math.__dict__)
|
||||||
def _factorial(x):
|
def _factorial(x):
|
||||||
|
@ -157,7 +157,7 @@ class Math(callbacks.Plugin):
|
|||||||
else:
|
else:
|
||||||
return '%s%s' % (realS, imagS)
|
return '%s%s' % (realS, imagS)
|
||||||
|
|
||||||
_calc_match_forbidden_chars = re.compile('[_[\]]')
|
_calc_match_forbidden_chars = re.compile('[_\[\]]')
|
||||||
_calc_remover = utils.str.MultipleRemover('_[] \t')
|
_calc_remover = utils.str.MultipleRemover('_[] \t')
|
||||||
###
|
###
|
||||||
# So this is how the 'calc' command works:
|
# So this is how the 'calc' command works:
|
||||||
|
@ -151,7 +151,7 @@ class Nickometer(callbacks.Plugin):
|
|||||||
nickInitial = nick
|
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)
|
||||||
nick=re.sub('^([^[\]]*)(\[)(.*)(\])([^[\]]*)$', '\1\3\5', nick, 1)
|
nick=re.sub('^([^\[\]]*)(\[)(.*)(\])([^\[\]]*)$', '\1\3\5', nick, 1)
|
||||||
if nick == nickInitial:
|
if nick == nickInitial:
|
||||||
break
|
break
|
||||||
self.log.debug('Removed some matching brackets %r => %r',
|
self.log.debug('Removed some matching brackets %r => %r',
|
||||||
|
@ -181,7 +181,7 @@ def _hostmaskPatternEqual(pattern, hostmask):
|
|||||||
elif c == '?':
|
elif c == '?':
|
||||||
fd.write('.')
|
fd.write('.')
|
||||||
elif c in '[{':
|
elif c in '[{':
|
||||||
fd.write('[[{]')
|
fd.write(r'[\[{]')
|
||||||
elif c in '}]':
|
elif c in '}]':
|
||||||
fd.write(r'[}\]]')
|
fd.write(r'[}\]]')
|
||||||
elif c in '|\\':
|
elif c in '|\\':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user