LibCST/libcst/tests/pyre/simple_class.json
Amethyst Reese d94687e378
Script to regenerate test fixtures (#872)
Upgrading Pyre requires updating test fixtures with any upstream changes
to Pyre's query results for the `simple_class.py` fixture.

This adds a new `scripts/` directory to the repo, with a script to
regenerate test fixtures. The script regenerates the cache data fixture,
and updates the `TypeInferenceProvider` tests to use `assertDictEqual`
and helpful error messages for better behavior in future mismatches.

This also includes a slight bump to Pyre 0.9.10 to fix install issues on
Apple Silicon M1 Macs, and regenerated fixtures using the script above.
2023-02-22 12:35:23 -08:00

511 lines
No EOL
9.5 KiB
JSON

{
"types": [
{
"annotation": "typing.Type[typing.Sequence]",
"location": {
"start": {
"column": 19,
"line": 7
},
"stop": {
"column": 27,
"line": 7
}
}
},
{
"annotation": "typing.Type[simple_class.Item]",
"location": {
"start": {
"column": 6,
"line": 10
},
"stop": {
"column": 10,
"line": 10
}
}
},
{
"annotation": "typing.Callable(simple_class.Item.__init__)[[Named(self, simple_class.Item), Named(n, int)], None]",
"location": {
"start": {
"column": 8,
"line": 11
},
"stop": {
"column": 16,
"line": 11
}
}
},
{
"annotation": "simple_class.Item",
"location": {
"start": {
"column": 17,
"line": 11
},
"stop": {
"column": 21,
"line": 11
}
}
},
{
"annotation": "int",
"location": {
"start": {
"column": 23,
"line": 11
},
"stop": {
"column": 24,
"line": 11
}
}
},
{
"annotation": "typing.Type[int]",
"location": {
"start": {
"column": 26,
"line": 11
},
"stop": {
"column": 29,
"line": 11
}
}
},
{
"annotation": "None",
"location": {
"start": {
"column": 34,
"line": 11
},
"stop": {
"column": 38,
"line": 11
}
}
},
{
"annotation": "simple_class.Item",
"location": {
"start": {
"column": 8,
"line": 12
},
"stop": {
"column": 12,
"line": 12
}
}
},
{
"annotation": "int",
"location": {
"start": {
"column": 8,
"line": 12
},
"stop": {
"column": 19,
"line": 12
}
}
},
{
"annotation": "typing.Type[int]",
"location": {
"start": {
"column": 21,
"line": 12
},
"stop": {
"column": 24,
"line": 12
}
}
},
{
"annotation": "int",
"location": {
"start": {
"column": 27,
"line": 12
},
"stop": {
"column": 28,
"line": 12
}
}
},
{
"annotation": "typing.Type[simple_class.ItemCollector]",
"location": {
"start": {
"column": 6,
"line": 15
},
"stop": {
"column": 19,
"line": 15
}
}
},
{
"annotation": "typing.Callable(simple_class.ItemCollector.get_items)[[Named(self, simple_class.ItemCollector), Named(n, int)], typing.Sequence[simple_class.Item]]",
"location": {
"start": {
"column": 8,
"line": 16
},
"stop": {
"column": 17,
"line": 16
}
}
},
{
"annotation": "simple_class.ItemCollector",
"location": {
"start": {
"column": 18,
"line": 16
},
"stop": {
"column": 22,
"line": 16
}
}
},
{
"annotation": "int",
"location": {
"start": {
"column": 24,
"line": 16
},
"stop": {
"column": 25,
"line": 16
}
}
},
{
"annotation": "typing.Type[int]",
"location": {
"start": {
"column": 27,
"line": 16
},
"stop": {
"column": 30,
"line": 16
}
}
},
{
"annotation": "BoundMethod[typing.Callable(typing.GenericMeta.__getitem__)[[Named(self, unknown), typing.Type[Variable[typing._T_co](covariant)]], typing.Type[typing.Sequence[Variable[typing._T_co](covariant)]]], typing.Type[typing.Sequence]]",
"location": {
"start": {
"column": 35,
"line": 16
},
"stop": {
"column": 43,
"line": 16
}
}
},
{
"annotation": "typing.Type[typing.Sequence[simple_class.Item]]",
"location": {
"start": {
"column": 35,
"line": 16
},
"stop": {
"column": 49,
"line": 16
}
}
},
{
"annotation": "typing.Type[simple_class.Item]",
"location": {
"start": {
"column": 44,
"line": 16
},
"stop": {
"column": 48,
"line": 16
}
}
},
{
"annotation": "typing.List[simple_class.Item]",
"location": {
"start": {
"column": 15,
"line": 17
},
"stop": {
"column": 42,
"line": 17
}
}
},
{
"annotation": "typing.Type[simple_class.Item]",
"location": {
"start": {
"column": 16,
"line": 17
},
"stop": {
"column": 20,
"line": 17
}
}
},
{
"annotation": "simple_class.Item",
"location": {
"start": {
"column": 16,
"line": 17
},
"stop": {
"column": 23,
"line": 17
}
}
},
{
"annotation": "int",
"location": {
"start": {
"column": 28,
"line": 17
},
"stop": {
"column": 29,
"line": 17
}
}
},
{
"annotation": "typing.Type[range]",
"location": {
"start": {
"column": 33,
"line": 17
},
"stop": {
"column": 38,
"line": 17
}
}
},
{
"annotation": "range",
"location": {
"start": {
"column": 33,
"line": 17
},
"stop": {
"column": 41,
"line": 17
}
}
},
{
"annotation": "int",
"location": {
"start": {
"column": 39,
"line": 17
},
"stop": {
"column": 40,
"line": 17
}
}
},
{
"annotation": "simple_class.ItemCollector",
"location": {
"start": {
"column": 0,
"line": 20
},
"stop": {
"column": 9,
"line": 20
}
}
},
{
"annotation": "typing.Type[simple_class.ItemCollector]",
"location": {
"start": {
"column": 12,
"line": 20
},
"stop": {
"column": 25,
"line": 20
}
}
},
{
"annotation": "simple_class.ItemCollector",
"location": {
"start": {
"column": 12,
"line": 20
},
"stop": {
"column": 27,
"line": 20
}
}
},
{
"annotation": "typing.Sequence[simple_class.Item]",
"location": {
"start": {
"column": 0,
"line": 21
},
"stop": {
"column": 5,
"line": 21
}
}
},
{
"annotation": "typing.Type[typing.Sequence[simple_class.Item]]",
"location": {
"start": {
"column": 7,
"line": 21
},
"stop": {
"column": 21,
"line": 21
}
}
},
{
"annotation": "simple_class.ItemCollector",
"location": {
"start": {
"column": 24,
"line": 21
},
"stop": {
"column": 33,
"line": 21
}
}
},
{
"annotation": "BoundMethod[typing.Callable(simple_class.ItemCollector.get_items)[[Named(self, simple_class.ItemCollector), Named(n, int)], typing.Sequence[simple_class.Item]], simple_class.ItemCollector]",
"location": {
"start": {
"column": 24,
"line": 21
},
"stop": {
"column": 43,
"line": 21
}
}
},
{
"annotation": "typing.Sequence[simple_class.Item]",
"location": {
"start": {
"column": 24,
"line": 21
},
"stop": {
"column": 46,
"line": 21
}
}
},
{
"annotation": "typing_extensions.Literal[3]",
"location": {
"start": {
"column": 44,
"line": 21
},
"stop": {
"column": 45,
"line": 21
}
}
},
{
"annotation": "simple_class.Item",
"location": {
"start": {
"column": 4,
"line": 22
},
"stop": {
"column": 8,
"line": 22
}
}
},
{
"annotation": "typing.Sequence[simple_class.Item]",
"location": {
"start": {
"column": 12,
"line": 22
},
"stop": {
"column": 17,
"line": 22
}
}
},
{
"annotation": "simple_class.Item",
"location": {
"start": {
"column": 4,
"line": 23
},
"stop": {
"column": 8,
"line": 23
}
}
},
{
"annotation": "int",
"location": {
"start": {
"column": 4,
"line": 23
},
"stop": {
"column": 15,
"line": 23
}
}
}
]
}