Merge pull request #297 from KPilnacek/fix_depracation_warnings_for_python_3-7
Fix deprecation warnings in 3.7
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
from collections import Iterable
|
||||
from collections.abc import Iterable
|
||||
from contextlib import contextmanager
|
||||
from functools import partial
|
||||
from inspect import signature
|
||||
|
||||
@ -6,7 +6,7 @@ import warnings
|
||||
from contextlib import contextmanager
|
||||
|
||||
__escape_decoder = codecs.getdecoder("unicode_escape")
|
||||
__posix_variable = re.compile("\$\{[^\}]*\}")
|
||||
__posix_variable = re.compile(r"\$\{[^\}]*\}")
|
||||
|
||||
|
||||
def parse_var(var):
|
||||
|
||||
@ -24,7 +24,7 @@ def sweeten_errors():
|
||||
length = len(pre_re.sub("\\1\\2\\3", arg))
|
||||
|
||||
arg = pre_re.sub(w("\\1") + term.bold("\\2") + w("\\3"), arg)
|
||||
arg = re.sub("^ \$ (.*)", term.lightblack(" $ ") + term.reset("\\1"), arg)
|
||||
arg = re.sub(r"^ \$ (.*)", term.lightblack(" $ ") + term.reset("\\1"), arg)
|
||||
|
||||
return (arg, length)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user