Lines Matching refs:ForwardRef

34 from typing import Annotated, ForwardRef
431 self.assertEqual(get_args(X | "x"), (X, ForwardRef("x")))
432 self.assertEqual(get_args("x" | X), (ForwardRef("x"), X))
3709 def foobar2(x: list[list[ForwardRef('CC')]]): ...
3710 def foobar3(x: list[ForwardRef('CC | int')] | int): ...
3769 {'x': list[list[ForwardRef('X')]]}
4529 fr = typing.ForwardRef('int')
4534 fr = typing.ForwardRef('int')
4540 typing.ForwardRef(1) # only `str` type is allowed
4543 fr = typing.ForwardRef('int')
4544 self.assertEqual(fr, typing.ForwardRef('int'))
4546 self.assertNotEqual(fr, typing.ForwardRef('int', module=__name__))
4547 frm = typing.ForwardRef('int', module=__name__)
4548 self.assertEqual(frm, typing.ForwardRef('int', module=__name__))
4549 self.assertNotEqual(frm, typing.ForwardRef('int', module='__other_name__'))
4552 c1 = typing.ForwardRef('C')
4553 c1_gth = typing.ForwardRef('C')
4554 c2 = typing.ForwardRef('C')
4555 c2_gth = typing.ForwardRef('C')
4573 c1 = typing.ForwardRef('int')
4574 c1_gth = typing.ForwardRef('int')
4575 c2 = typing.ForwardRef('int')
4576 c2_gth = typing.ForwardRef('int')
4586 c3 = typing.ForwardRef('int', module=__name__)
4587 c4 = typing.ForwardRef('int', module='__other_name__')
4592 self.assertEqual(hash(c3), hash(typing.ForwardRef('int', module=__name__)))
4598 a = typing.ForwardRef('A')
4605 a = typing.ForwardRef('A')
4619 self.assertEqual(repr(List['int']), "typing.List[ForwardRef('int')]")
4620 self.assertEqual(repr(List[ForwardRef('int', module='mod')]),
4621 "typing.List[ForwardRef('int', module='mod')]")
4631 def foo(a: tuple[ForwardRef('T')] | int):
4645 def foo(a: tuple[ForwardRef('T')]):
4659 a = typing.ForwardRef('A')
4667 a = typing.ForwardRef('A')
4954 X = ForwardRef('X')
5341 def foobar(x: list[ForwardRef('X')]): ...
8024 typing.ForwardRef: 'ForwardRef',
8048 # - typing.ForwardRef('set[Any]')
8070 fr = typing.ForwardRef('set[Any]')