mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-19796 Fixed: Incorrect parameter type hint for ord() function parameter
Update skeleton of ord function to accept bytes in Py3
This commit is contained in:
@@ -250,7 +250,7 @@ def open(name, mode='r', buffering=-1, encoding=None, errors=None, newline=None,
|
||||
def ord(c):
|
||||
"""Return the integer ordinal of a one-character string.
|
||||
|
||||
:type c: str
|
||||
:type c: bytes | str
|
||||
:rtype: int
|
||||
"""
|
||||
return 0
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
ord(b'A')
|
||||
ord('A')
|
||||
@@ -108,4 +108,9 @@ public class Py3TypeCheckerInspectionTest extends PyTestCase {
|
||||
public void testListGetItemWithSlice() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
// PY-19796
|
||||
public void testOrd() {
|
||||
doTest();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user