mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-119180: PEP 649 compiler changes (#119361)
This commit is contained in:
parent
02c1dfff07
commit
9b8611eeea
28 changed files with 610 additions and 329 deletions
|
@ -622,6 +622,7 @@ class TracebackErrorLocationCaretTestBase:
|
|||
def f_with_type():
|
||||
def foo(a: THIS_DOES_NOT_EXIST ) -> int:
|
||||
return 0
|
||||
foo.__annotations__
|
||||
|
||||
lineno_f = f_with_type.__code__.co_firstlineno
|
||||
expected_f = (
|
||||
|
@ -629,7 +630,9 @@ class TracebackErrorLocationCaretTestBase:
|
|||
f' File "{__file__}", line {self.callable_line}, in get_exception\n'
|
||||
' callable()\n'
|
||||
' ~~~~~~~~^^\n'
|
||||
f' File "{__file__}", line {lineno_f+1}, in f_with_type\n'
|
||||
f' File "{__file__}", line {lineno_f+3}, in f_with_type\n'
|
||||
' foo.__annotations__\n'
|
||||
f' File "{__file__}", line {lineno_f+1}, in __annotate__\n'
|
||||
' def foo(a: THIS_DOES_NOT_EXIST ) -> int:\n'
|
||||
' ^^^^^^^^^^^^^^^^^^^\n'
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue