Skip to content

Commit 805a253

Browse files
committed
sourcegraph#91 - adds reproducible test cases and fixes
1 parent eed38b8 commit 805a253

File tree

44 files changed

+424
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+424
-0
lines changed

packages/pyright-scip/snapshots/input/nested_item__fix_no_import/src/__init__.py

Whitespace-only changes.

packages/pyright-scip/snapshots/input/nested_item__fix_no_import/src/foo/__init__.py

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class InitClass:
2+
init_item = 10
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class SuchNestedMuchWow:
2+
class_item: int = 42
3+
4+
class AnotherNestedMuchWow:
5+
other_item: int = 42

packages/pyright-scip/snapshots/input/nested_item__fix_qualified_imports/src/__init__.py

Whitespace-only changes.

packages/pyright-scip/snapshots/input/nested_item__fix_qualified_imports/src/foo/__init__.py

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class InitClass:
2+
init_item = 10
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class SuchNestedMuchWow:
2+
class_item: int = 42
3+
4+
class AnotherNestedMuchWow:
5+
other_item: int = 42
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from src.foo.bar import InitClass
2+
from src.foo.bar.baz.mod import SuchNestedMuchWow, AnotherNestedMuchWow
3+
4+
print(SuchNestedMuchWow().class_item)
5+
print(AnotherNestedMuchWow().other_item)
6+
print(InitClass().init_item)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import src.foo.bar.baz.mod
2+
3+
print(src.foo.bar.baz.mod.SuchNestedMuchWow)

packages/pyright-scip/snapshots/input/nested_item__fix_relative_imports/src/__init__.py

Whitespace-only changes.

packages/pyright-scip/snapshots/input/nested_item__fix_relative_imports/src/foo/__init__.py

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class InitClass:
2+
init_item = 10
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class SuchNestedMuchWow:
2+
class_item: int = 42
3+
4+
class AnotherNestedMuchWow:
5+
other_item: int = 42
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from .foo.bar import InitClass
2+
from .foo.bar.baz.mod import SuchNestedMuchWow, AnotherNestedMuchWow
3+
4+
print(SuchNestedMuchWow().class_item)
5+
print(AnotherNestedMuchWow().other_item)
6+
print(InitClass().init_item)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .foo.bar.baz import mod
2+
3+
print(mod.SuchNestedMuchWow)

packages/pyright-scip/snapshots/input/nested_item__macos/src/__init__.py

Whitespace-only changes.

packages/pyright-scip/snapshots/input/nested_item__macos/src/foo/__init__.py

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class InitClass:
2+
init_item = 10
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class SuchNestedMuchWow:
2+
class_item: int = 42
3+
4+
class AnotherNestedMuchWow:
5+
other_item: int = 42
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from foo.bar import InitClass
2+
from foo.bar.baz.mod import SuchNestedMuchWow, AnotherNestedMuchWow
3+
4+
print(SuchNestedMuchWow().class_item)
5+
print(AnotherNestedMuchWow().other_item)
6+
print(InitClass().init_item)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import foo.bar.baz.mod
2+
3+
print(foo.bar.baz.mod.SuchNestedMuchWow)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# < definition scip-python python snapshot-util 0.1 src/__init__:
2+
#documentation (module) src
3+
4+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# < definition scip-python python snapshot-util 0.1 `src.foo`/__init__:
2+
#documentation (module) src.foo
3+
4+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# < definition scip-python python snapshot-util 0.1 `src.foo.bar`/__init__:
2+
#documentation (module) src.foo.bar
3+
4+
class InitClass:
5+
# ^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar`/InitClass#
6+
# documentation ```python
7+
# > class InitClass:
8+
# > ```
9+
init_item = 10
10+
# ^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar`/InitClass#init_item.
11+
# documentation ```python
12+
# > builtins.int
13+
# > ```
14+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# < definition scip-python python snapshot-util 0.1 `src.foo.bar.baz.mod`/__init__:
2+
#documentation (module) src.foo.bar.baz.mod
3+
4+
class SuchNestedMuchWow:
5+
# ^^^^^^^^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#
6+
# documentation ```python
7+
# > class SuchNestedMuchWow:
8+
# > ```
9+
class_item: int = 42
10+
# ^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#class_item.
11+
# documentation ```python
12+
# > (variable) class_item: Literal[42]
13+
# > ```
14+
# ^^^ reference python-stdlib 3.11 builtins/int#
15+
# external documentation ```python
16+
# > (class) int
17+
# > ```
18+
19+
class AnotherNestedMuchWow:
20+
# ^^^^^^^^^^^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#
21+
# documentation ```python
22+
# > class AnotherNestedMuchWow:
23+
# > ```
24+
other_item: int = 42
25+
# ^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#other_item.
26+
# documentation ```python
27+
# > (variable) other_item: Literal[42]
28+
# > ```
29+
# ^^^ reference python-stdlib 3.11 builtins/int#
30+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# < definition scip-python python snapshot-util 0.1 src/__init__:
2+
#documentation (module) src
3+
4+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# < definition scip-python python snapshot-util 0.1 `src.foo`/__init__:
2+
#documentation (module) src.foo
3+
4+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# < definition scip-python python snapshot-util 0.1 `src.foo.bar`/__init__:
2+
#documentation (module) src.foo.bar
3+
4+
class InitClass:
5+
# ^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar`/InitClass#
6+
# documentation ```python
7+
# > class InitClass:
8+
# > ```
9+
init_item = 10
10+
# ^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar`/InitClass#init_item.
11+
# documentation ```python
12+
# > builtins.int
13+
# > ```
14+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# < definition scip-python python snapshot-util 0.1 `src.foo.bar.baz.mod`/__init__:
2+
#documentation (module) src.foo.bar.baz.mod
3+
4+
class SuchNestedMuchWow:
5+
# ^^^^^^^^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#
6+
# documentation ```python
7+
# > class SuchNestedMuchWow:
8+
# > ```
9+
class_item: int = 42
10+
# ^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#class_item.
11+
# documentation ```python
12+
# > (variable) class_item: Literal[42]
13+
# > ```
14+
# ^^^ reference python-stdlib 3.11 builtins/int#
15+
# external documentation ```python
16+
# > (class) int
17+
# > ```
18+
19+
class AnotherNestedMuchWow:
20+
# ^^^^^^^^^^^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#
21+
# documentation ```python
22+
# > class AnotherNestedMuchWow:
23+
# > ```
24+
other_item: int = 42
25+
# ^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#other_item.
26+
# documentation ```python
27+
# > (variable) other_item: Literal[42]
28+
# > ```
29+
# ^^^ reference python-stdlib 3.11 builtins/int#
30+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# < definition scip-python python snapshot-util 0.1 `src.importer`/__init__:
2+
#documentation (module) src.importer
3+
4+
from src.foo.bar import InitClass
5+
# ^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar`/__init__:
6+
# ^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar`/InitClass#
7+
from src.foo.bar.baz.mod import SuchNestedMuchWow, AnotherNestedMuchWow
8+
# ^^^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/__init__:
9+
# ^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#
10+
# ^^^^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#
11+
12+
print(SuchNestedMuchWow().class_item)
13+
#^^^^ reference python-stdlib 3.11 builtins/print().
14+
#external documentation ```python
15+
# > (function) def print(
16+
# > *values: object,
17+
# > sep: str | None = " ",
18+
# > end: str | None = "\n",
19+
# > file: SupportsWrite[str] | None = No...
20+
# > flush: Literal[False] = False
21+
# > ) -> None
22+
# > ```
23+
# ^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#
24+
# ^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#class_item.
25+
print(AnotherNestedMuchWow().other_item)
26+
#^^^^ reference python-stdlib 3.11 builtins/print().
27+
# ^^^^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#
28+
# ^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#other_item.
29+
print(InitClass().init_item)
30+
#^^^^ reference python-stdlib 3.11 builtins/print().
31+
# ^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar`/InitClass#
32+
# ^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar`/InitClass#init_item.
33+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# < definition scip-python python snapshot-util 0.1 `src.long_importer`/__init__:
2+
#documentation (module) src.long_importer
3+
4+
import src.foo.bar.baz.mod
5+
# ^^^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/__init__:
6+
7+
print(src.foo.bar.baz.mod.SuchNestedMuchWow)
8+
#^^^^ reference python-stdlib 3.11 builtins/print().
9+
#external documentation ```python
10+
# > (function) def print(
11+
# > *values: object,
12+
# > sep: str | None = " ",
13+
# > end: str | None = "\n",
14+
# > file: SupportsWrite[str] | None = No...
15+
# > flush: Literal[False] = False
16+
# > ) -> None
17+
# > ```
18+
# ^^^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/__init__:
19+
# ^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#
20+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# < definition scip-python python snapshot-util 0.1 src/__init__:
2+
#documentation (module) src
3+
4+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# < definition scip-python python snapshot-util 0.1 `src.foo`/__init__:
2+
#documentation (module) src.foo
3+
4+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# < definition scip-python python snapshot-util 0.1 `src.foo.bar`/__init__:
2+
#documentation (module) src.foo.bar
3+
4+
class InitClass:
5+
# ^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar`/InitClass#
6+
# documentation ```python
7+
# > class InitClass:
8+
# > ```
9+
init_item = 10
10+
# ^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar`/InitClass#init_item.
11+
# documentation ```python
12+
# > builtins.int
13+
# > ```
14+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# < definition scip-python python snapshot-util 0.1 `src.foo.bar.baz.mod`/__init__:
2+
#documentation (module) src.foo.bar.baz.mod
3+
4+
class SuchNestedMuchWow:
5+
# ^^^^^^^^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#
6+
# documentation ```python
7+
# > class SuchNestedMuchWow:
8+
# > ```
9+
class_item: int = 42
10+
# ^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#class_item.
11+
# documentation ```python
12+
# > (variable) class_item: Literal[42]
13+
# > ```
14+
# ^^^ reference python-stdlib 3.11 builtins/int#
15+
# external documentation ```python
16+
# > (class) int
17+
# > ```
18+
19+
class AnotherNestedMuchWow:
20+
# ^^^^^^^^^^^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#
21+
# documentation ```python
22+
# > class AnotherNestedMuchWow:
23+
# > ```
24+
other_item: int = 42
25+
# ^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#other_item.
26+
# documentation ```python
27+
# > (variable) other_item: Literal[42]
28+
# > ```
29+
# ^^^ reference python-stdlib 3.11 builtins/int#
30+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# < definition scip-python python snapshot-util 0.1 `src.importer`/__init__:
2+
#documentation (module) src.importer
3+
4+
from .foo.bar import InitClass
5+
# ^^^^^^^^ reference snapshot-util 0.1 `foo.bar`/__init__:
6+
# ^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar`/InitClass#
7+
from .foo.bar.baz.mod import SuchNestedMuchWow, AnotherNestedMuchWow
8+
# ^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `foo.bar.baz.mod`/__init__:
9+
# ^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#
10+
# ^^^^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#
11+
12+
print(SuchNestedMuchWow().class_item)
13+
#^^^^ reference python-stdlib 3.11 builtins/print().
14+
#external documentation ```python
15+
# > (function) def print(
16+
# > *values: object,
17+
# > sep: str | None = " ",
18+
# > end: str | None = "\n",
19+
# > file: SupportsWrite[str] | None = No...
20+
# > flush: Literal[False] = False
21+
# > ) -> None
22+
# > ```
23+
# ^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#
24+
# ^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#class_item.
25+
print(AnotherNestedMuchWow().other_item)
26+
#^^^^ reference python-stdlib 3.11 builtins/print().
27+
# ^^^^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#
28+
# ^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#other_item.
29+
print(InitClass().init_item)
30+
#^^^^ reference python-stdlib 3.11 builtins/print().
31+
# ^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar`/InitClass#
32+
# ^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar`/InitClass#init_item.
33+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# < definition scip-python python snapshot-util 0.1 `src.long_importer`/__init__:
2+
#documentation (module) src.long_importer
3+
4+
from .foo.bar.baz import mod
5+
# ^^^^^^^^^^^^ reference snapshot-util 0.1 `foo.bar.baz`/__init__:
6+
# ^^^ reference snapshot-util 0.1 `foo.bar.baz.mod`/__init__:
7+
8+
print(mod.SuchNestedMuchWow)
9+
#^^^^ reference python-stdlib 3.11 builtins/print().
10+
#external documentation ```python
11+
# > (function) def print(
12+
# > *values: object,
13+
# > sep: str | None = " ",
14+
# > end: str | None = "\n",
15+
# > file: SupportsWrite[str] | None = No...
16+
# > flush: Literal[False] = False
17+
# > ) -> None
18+
# > ```
19+
# ^^^ reference snapshot-util 0.1 `foo.bar.baz.mod`/__init__:
20+
# ^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#
21+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# < definition scip-python python snapshot-util 0.1 src/__init__:
2+
#documentation (module) src
3+
4+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# < definition scip-python python snapshot-util 0.1 /__init__:
2+
#documentation (module)
3+
4+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# < definition scip-python python snapshot-util 0.1 /__init__:
2+
#documentation (module)
3+
4+
class InitClass:
5+
# ^^^^^^^^^ definition snapshot-util 0.1 /InitClass#
6+
# documentation ```python
7+
# > class InitClass:
8+
# > ```
9+
init_item = 10
10+
# ^^^^^^^^^ definition snapshot-util 0.1 /InitClass#init_item.
11+
# documentation ```python
12+
# > builtins.int
13+
# > ```
14+

0 commit comments

Comments
 (0)