mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-10 15:51:51 +08:00
replace _sre fake module literals with undefined types.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user