##// END OF EJS Templates
change regex fullmatch to match for <3.3 compatibility
sagnak -
Show More
@@ -657,11 +657,11 b' class Completer(Configurable):'
657 if word[:n] == text and word != "__builtins__":
657 if word[:n] == text and word != "__builtins__":
658 match_append(word)
658 match_append(word)
659
659
660 snake_case_re = re.compile(r"[^_]+(_[^_]+)+?")
660 snake_case_re = re.compile(r"[^_]+(_[^_]+)+?\Z")
661 for lst in [self.namespace.keys(),
661 for lst in [self.namespace.keys(),
662 self.global_namespace.keys()]:
662 self.global_namespace.keys()]:
663 shortened = {"_".join([sub[0] for sub in word.split('_')]) : word
663 shortened = {"_".join([sub[0] for sub in word.split('_')]) : word
664 for word in lst if snake_case_re.fullmatch(word)}
664 for word in lst if snake_case_re.match(word)}
665 for word in shortened.keys():
665 for word in shortened.keys():
666 if word[:n] == text and word != "__builtins__":
666 if word[:n] == text and word != "__builtins__":
667 match_append(shortened[word])
667 match_append(shortened[word])
General Comments 0
You need to be logged in to leave comments. Login now