From ea271c80472bb1401bd6b9b28d4b2a44e3b36a6c Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 20 Jun 2014 11:18:54 +0200 Subject: [PATCH] replace _sre fake module literals with undefined types. --- jedi/evaluate/compiled/fake/_sre.pym | 40 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/jedi/evaluate/compiled/fake/_sre.pym b/jedi/evaluate/compiled/fake/_sre.pym index 40b3c450..217be563 100644 --- a/jedi/evaluate/compiled/fake/_sre.pym +++ b/jedi/evaluate/compiled/fake/_sre.pym @@ -1,48 +1,48 @@ def compile(): class SRE_Match(): - endpos = 1 - lastgroup = 0 - lastindex = 1 - pos = 0 - string = 'a' - regs = ((0, 1),) + endpos = int() + lastgroup = int() + lastindex = int() + pos = int() + string = str() + regs = ((int(), int()),) def __init__(self, pattern): self.re = pattern def start(self): - return 0 + return int() def end(self): - return 1 + return int() def span(self): - return 0, 1 + return int(), int() def expand(self): - return '' + return str() def group(self, nr): - return '' + return str() def groupdict(self): - return {'a', 'a'} + return {str(): str()} def groups(self): - return ('a',) + return (str(),) class SRE_Pattern(): - flags = 0 + flags = int() groupindex = {} - groups = 0 - pattern = 'a' + groups = int() + pattern = str() def findall(self, string, pos=None, endpos=None): """ findall(string[, pos[, endpos]]) --> list. Return a list of all non-overlapping matches of pattern in string. """ - return ['a'] + return [str()] def finditer(self, string, pos=None, endpos=None): """ @@ -77,7 +77,7 @@ def compile(): split(string[, maxsplit = 0]) --> list. Split string by the occurrences of pattern. """ - return ['a'] + return [str()] def sub(self, repl, string, count=0): """ @@ -85,7 +85,7 @@ def compile(): Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. """ - return '' + return str() def subn(self, repl, string, count=0): """ @@ -94,6 +94,6 @@ def compile(): the leftmost non-overlapping occurrences of pattern with the replacement repl. """ - return ('', 1) + return (str(), int()) return SRE_Pattern()