PY-19085 Fixed: Unresolved attribute reference 'fullmatch' for class '__Regex'

Add re.fullmatch and __Regex.fullmatch to skeletons
This commit is contained in:
Semyon Proshev
2016-07-15 19:16:07 +03:00
parent 11f9d47843
commit 3eadc8bc13
3 changed files with 30 additions and 0 deletions
+21
View File
@@ -34,6 +34,17 @@ def match(pattern, string, flags=0):
pass
def fullmatch(pattern, string, flags=0):
"""Matches the whole string.
:type pattern: bytes | unicode | __Regex
:type string: T <= bytes | unicode
:type flags: int
:rtype: __Match[T] | None
"""
pass
def split(pattern, string, maxsplit=0, flags=0):
"""Split string by the occurrences of pattern.
@@ -144,6 +155,16 @@ class __Regex(object):
"""
pass
def fullmatch(self, string, pos=0, endpos=-1):
"""Matches the whole string.
:type string: T <= bytes | unicode
:type pos: int
:type endpos: int
:rtype: __Match[T] | None
"""
pass
def split(self, string, maxsplit=0):
"""Split string by the occurrences of pattern.
@@ -0,0 +1,4 @@
import re
a = re.compile('').fullmatch()
b = re.fullmatch('', '')
@@ -141,4 +141,9 @@ public class Py3UnresolvedReferencesInspectionTest extends PyTestCase {
public void testDunderClass() {
doTest();
}
// PY-19085
public void testReAndRegexFullmatch() {
doTest();
}
}