8000 fixup: fix snapshots and type errors · sourcegraph/scip-python@f1b779c · GitHub
[go: up one dir, main page]

Skip to content

Commit f1b779c

Browse files
committed
fixup: fix snapshots and type errors
1 parent f13355f commit f1b779c

File tree

27 files changed

+270
-138
lines changed

27 files changed

+270
-138
lines changed

packages/pyright-scip/snapshots/output/aliased_import/actual.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@
1111
# > ```
1212

1313
print(A.SOME_CONSTANT)
14-
#^^^^ reference python-stdlib 3.10 builtins/__init__:print().
14+
#^^^^ reference python-stdlib 3.11 builtins/__init__:print().
1515
#external documentation ```python
16-
# > (function)
17-
# > print(*values: object, sep: str | None =...
18-
# >
19-
# > print(*values: object, sep: str | None =...
16+
# > (function) def print(
17+
# > *values: object,
18+
# > sep: str | None = " ",
19+
# > end: str | None = "\n",
20+
# > file: SupportsWrite[str] | None = No...
21+
# > flush: Literal[False] = False
22+
# > ) -> None
2023
# > ```
2124
# ^ reference local 0
2225
# ^^^^^^^^^^^^^ reference snapshot-util 0.1 aliased/SOME_CONSTANT.

packages/pyright-scip/snapshots/output/builtin_imports/builtin_imports.py

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,53 @@
22
#documentation (module) builtin_imports
33

44
import re
5-
# ^^ reference python-stdlib 3.10 re/__init__:
5+
# ^^ reference python-stdlib 3.11 re/__init__:
66
from typing import Callable, Optional
7-
# ^^^^^^ reference python-stdlib 3.10 typing/__init__:
7+
# ^^^^^^ reference python-stdlib 3.11 typing/__init__:
88
# external documentation ```python
99
# > (module) typing
1010
# > ```
11-
# ^^^^^^^^ reference python-stdlib 3.10 typing/Callable.
11+
# external documentation ---
12+
# >
13+
# external documentation The typing module: Support for gradual t...
14+
# >
15+
# > At large scale, the structure of the mod...
16+
# > * Imports and exports, all public names...
17+
# > * Internal helper functions: these shou...
18+
# > * \_SpecialForm and its instances (spec...
19+
# > Any, NoReturn, ClassVar, Union, Optional...
20+
# > * Classes whose instances can be type a...
21+
# > ForwardRef, TypeVar and ParamSpec
22+
# > * The core of internal generics API: \_...
23+
# > currently only used by Tuple and Callabl...
24+
# > etc., are instances of either of these c...
25+
# > * The public counterpart of the generic...
26+
# > * Public helper functions: get\_type\_h...
27+
# > no\_type\_check\_decorator.
28+
# > * Generic aliases for collections.abc A...
29+
# > * Special types: NewType, NamedTuple, T...
30+
# > * Wrapper submodules for re and io rela...
31+
# ^^^^^^^^ reference python-stdlib 3.11 typing/Callable.
1232
# external documentation ```python
1333
# > (class) Callable
1434
# > ```
15-
# ^^^^^^^^ reference python-stdlib 3.10 typing/Optional.
35+
# ^^^^^^^^ reference python-stdlib 3.11 typing/Optional.
1636
# external documentation ```python
1737
# > (class) Optional
1838
# > ```
1939

2040
print(re, Callable, Optional)
21-
#^^^^ reference python-stdlib 3.10 builtins/__init__:print().
41+
#^^^^ reference python-stdlib 3.11 builtins/__init__:print().
2242
#external documentation ```python
23-
# > (function)
24-
# > print(*values: object, sep: str | None =...
25-
# >
26-
# > print(*values: object, sep: str | None =...
43+
# > (function) def print(
44+
# > *values: object,
45+
# > sep: str | None = " ",
46+
# > end: str | None = "\n",
47+
# > file: SupportsWrite[str] | None = No...
48+
# > flush: Literal[False] = False
49+
# > ) -> None
2750
# > ```
28-
# ^^ reference python-stdlib 3.10 re/__init__:
29-
# ^^^^^^^^ reference python-stdlib 3.10 typing/Callable.
30-
# ^^^^^^^^ reference python-stdlib 3.10 typing/Optional.
51+
# ^^ reference python-stdlib 3.11 re/__init__:
52+
# ^^^^^^^^ reference python-stdlib 3.11 typing/Callable.
53+
# ^^^^^^^^ reference python-stdlib 3.11 typing/Optional.
3154

packages/pyright-scip/snapshots/output/class_nohint/class_nohint.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Example:
1212
# documentation ```python
1313
# > (variable) y: int
1414
# > ```
15-
# ^^^ reference python-stdlib 3.10 builtins/int#
15+
# ^^^ reference python-stdlib 3.11 builtins/int#
1616
# external documentation ```python
1717
# > (class) int
1818
# > ```
@@ -53,17 +53,20 @@ def something(self):
5353
# > ```
5454
# ^^^^ definition snapshot-util 0.1 class_nohint/Example#something().(self)
5555
print(self.x)
56-
# ^^^^^ reference python-stdlib 3.10 builtins/__init__:print().
56+
# ^^^^^ reference python-stdlib 3.11 builtins/__init__:print().
5757
# external documentation ```python
58-
# > (function)
59-
# > print(*values: object, sep: str | None =...
60-
# >
61-
# > print(*values: object, sep: str | None =...
58+
# > (function) def print(
59+
# > *values: object,
60+
# > sep: str | None = " ",
61+
# > end: str | None = "\n",
62+
# > file: SupportsWrite[str] | None = No...
63+
# > flush: Literal[False] = False
64+
# > ) -> None
6265
# > ```
6366
# ^^^^ reference snapshot-util 0.1 class_nohint/Example#something().(self)
6467
# ^ reference snapshot-util 0.1 class_nohint/Example#x.
6568
print(self.y)
66-
# ^^^^^ reference python-stdlib 3.10 builtins/__init__:print().
69+
# ^^^^^ reference python-stdlib 3.11 builtins/__init__:print().
6770
# ^^^^ reference snapshot-util 0.1 class_nohint/Example#something().(self)
6871
# ^ reference snapshot-util 0.1 class_nohint/Example#y.
6972

packages/pyright-scip/snapshots/output/comprehensions/comp.py

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,19 @@ def something(x):
4444
# documentation ```python
4545
# > (variable) x: int
4646
# > ```
47-
# ^^^^^^^^^ reference python-stdlib 3.10 builtins/enumerate#
47+
# ^^^^^^^^^ reference python-stdlib 3.11 builtins/enumerate#
4848
# external documentation ```python
49-
# > (class) enumerate(iterable: Iterable[int...
49+
# > class enumerate(
50+
# > iterable: Iterable[int],
51+
# > start: int = ...
52+
# > )
5053
# > ```
51-
# ^^^^^ reference python-stdlib 3.10 builtins/range#
54+
# ^^^^^ reference python-stdlib 3.11 builtins/range#
5255
# external documentation ```python
53-
# > (class) range
56+
# > class range(
57+
# > __stop: SupportsIndex,
58+
# > /
59+
# > )
5460
# > ```
5561

5662

@@ -69,12 +75,15 @@ def something(x):
6975
# ^^^ definition snapshot-util 0.1 comp/var.
7076
# ^^^^ reference snapshot-util 0.1 comp/asdf.
7177
print(var)
72-
# ^^^^^ reference python-stdlib 3.10 builtins/__init__:print().
78+
# ^^^^^ reference python-stdlib 3.11 builtins/__init__:print().
7379
# external documentation ```python
74-
# > (function)
75-
# > print(*values: object, sep: str | None =...
76-
# >
77-
# > print(*values: object, sep: str | None =...
80+
# > (function) def print(
81+
# > *values: object,
82+
# > sep: str | None = " ",
83+
# > end: str | None = "\n",
84+
# > file: SupportsWrite[str] | None = No...
85+
# > flush: Literal[False] = False
86+
# > ) -> None
7887
# > ```
7988
# ^^^ reference snapshot-util 0.1 comp/var.
8089

packages/pyright-scip/snapshots/output/dunder_vars/__main__.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@
33

44

55
if __name__ == '__main__':
6-
# ^^^^^^^^ reference python-stdlib 3.10 builtins/__name__#
6+
# ^^^^^^^^ reference python-stdlib 3.11 builtins/__name__#
77
# external documentation ```python
88
# > __name__: str
99
# > ```
1010
print("main")
11-
# ^^^^^ reference python-stdlib 3.10 builtins/__init__:print().
11+
# ^^^^^ reference python-stdlib 3.11 builtins/__init__:print().
1212
# external documentation ```python
13-
# > (function)
14-
# > print(*values: object, sep: str | None =...
15-
# >
16-
# > print(*values: object, sep: str | None =...
13+
# > (function) def print(
14+
# > *values: object,
15+
# > sep: str | None = " ",
16+
# > end: str | None = "\n",
17+
# > file: SupportsWrite[str] | None = No...
18+
# > flush: Literal[False] = False
19+
# > ) -> None
1720
# > ```
1821

1922

packages/pyright-scip/snapshots/output/f_string/fstring.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@
88
# > ```
99

1010
print(f"var: hello {var}")
11-
#^^^^ reference python-stdlib 3.10 builtins/__init__:print().
11+
#^^^^ reference python-stdlib 3.11 builtins/__init__:print().
1212
#external documentation ```python
13-
# > (function)
14-
# > print(*values: object, sep: str | None =...
15-
# >
16-
# > print(*values: object, sep: str | None =...
13+
# > (function) def print(
14+
# > *values: object,
15+
# > sep: str | None = " ",
16+
# > end: str | None = "\n",
17+
# > file: SupportsWrite[str] | None = No...
18+
# > flush: Literal[False] = False
19+
# > ) -> None
1720
# > ```
1821
# ^^^ reference snapshot-util 0.1 fstring/var.
1922

packages/pyright-scip/snapshots/output/file_from_module_import/abc/file.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
# ^^^^^^^^^^^ reference snapshot-util 0.1 `xyz.nested_file`/__init__:
77

88
print(nested_file.X)
9-
#^^^^ reference python-stdlib 3.10 builtins/__init__:print().
9+
#^^^^ reference python-stdlib 3.11 builtins/__init__:print().
1010
#external documentation ```python
11-
# > (function)
12-
# > print(*values: object, sep: str | None =...
13-
# >
14-
# > print(*values: object, sep: str | None =...
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
1518
# > ```
1619
# ^^^^^^^^^^^ reference snapshot-util 0.1 `xyz.nested_file`/__init__:
1720
# ^ reference snapshot-util 0.1 `xyz.nested_file`/X.

packages/pyright-scip/snapshots/output/file_from_module_import/file_from_module.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
# ^^^^^^^^^^^ reference snapshot-util 0.1 `xyz.nested_file`/__init__:
77

88
print(nested_file.X)
9-
#^^^^ reference python-stdlib 3.10 builtins/__init__:print().
9+
#^^^^ reference python-stdlib 3.11 builtins/__init__:print().
1010
#external documentation ```python
11-
# > (function)
12-
# > print(*values: object, sep: str | None =...
13-
# >
14-
# > print(*values: object, sep: str | None =...
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
1518
# > ```
1619
# ^^^^^^^^^^^ reference snapshot-util 0.1 `xyz.nested_file`/__init__:
1720
# ^ reference snapshot-util 0.1 `xyz.nested_file`/X.

packages/pyright-scip/snapshots/output/nameparts_import/nameparts.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
#documentation (module) nameparts
33

44
import importlib.resources
5-
# ^^^^^^^^^^^^^^^^^^^ reference python-stdlib 3.10 `importlib.resources`/__init__:
5+
# ^^^^^^^^^^^^^^^^^^^ reference python-stdlib 3.11 `importlib.resources`/__init__:
66

77
importlib.resources.read_text('pre_commit.resources', 'filename')
8-
#^^^^^^^^^^^^^^^^^^ reference python-stdlib 3.10 `importlib.resources`/__init__:
8+
#^^^^^^^^^^^^^^^^^^ reference python-stdlib 3.11 `importlib.resources`/__init__:
99
# ^^^^^^^^^ reference local 0
1010
# documentation ```python
1111
# > def read_text(
1212
# > package: Package,
1313
# > resource: Resource,
14-
# > encoding: str = ...,
15-
# > errors: str = ...
14+
# > encoding: str = "utf-8",
15+
# > errors: str = "strict"
1616
# > ) -> str:
1717
# > ```
1818
importlib.resources.read_text('pre_commit.resources', 'filename')
19-
#^^^^^^^^ reference python-stdlib 3.10 `importlib.resources`/__init__:
19+
#^^^^^^^^ reference python-stdlib 3.11 `importlib.resources`/__init__:
2020
# ^^^^^^^^^ reference local 0
2121

packages/pyright-scip/snapshots/output/nested_items/src/foo/bar/baz/mod.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class SuchNestedMuchWow:
1111
# documentation ```python
1212
# > (variable) class_item: Literal[42]
1313
# > ```
14-
# ^^^ reference python-stdlib 3.10 builtins/int#
14+
# ^^^ reference python-stdlib 3.11 builtins/int#
1515
# external documentation ```python
1616
# > (class) int
1717
# > ```
@@ -26,5 +26,5 @@ class AnotherNestedMuchWow:
2626
# documentation ```python
2727
# > (variable) other_item: Literal[42]
2828
# > ```
29-
# ^^^ reference python-stdlib 3.10 builtins/int#
29+
# ^^^ reference python-stdlib 3.11 builtins/int#
3030

packages/pyright-scip/snapshots/output/nested_items/src/importer.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,24 @@
1010
# ^^^^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#
1111

1212
print(SuchNestedMuchWow().class_item)
13-
#^^^^ reference python-stdlib 3.10 builtins/__init__:print().
13+
#^^^^ reference python-stdlib 3.11 builtins/__init__:print().
1414
#external documentation ```python
15-
# > (function)
16-
# > print(*values: object, sep: str | None =...
17-
# >
18-
# > print(*values: object, sep: str | None =...
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
1922
# > ```
2023
# ^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#
2124
# ^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#class_item.
2225
print(AnotherNestedMuchWow().other_item)
23-
#^^^^ reference python-stdlib 3.10 builtins/__init__:print().
26+
#^^^^ reference python-stdlib 3.11 builtins/__init__:print().
2427
# ^^^^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#
2528
# ^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#other_item.
2629
print(InitClass().init_item)
27-
#^^^^ reference python-stdlib 3.10 builtins/__init__:print().
30+
#^^^^ reference python-stdlib 3.11 builtins/__init__:print().
2831
# ^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar`/InitClass#
2932
# ^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar`/InitClass#init_item.
3033

packages/pyright-scip/snapshots/output/nested_items/src/long_importer.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@
55
# ^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `foo.bar.baz.mod`/__init__:
66

77
print(foo.bar.baz.mod.SuchNestedMuchWow)
8-
#^^^^ reference python-stdlib 3.10 builtins/__init__:print().
8+
#^^^^ reference python-stdlib 3.11 builtins/__init__:print().
99
#external documentation ```python
10-
# > (function)
11-
# > print(*values: object, sep: str | None =...
12-
# >
13-
# > print(*values: object, sep: str | None =...
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
1417
# > ```
1518
# ^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `foo.bar.baz.mod`/__init__:
1619
# ^^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#

packages/pyright-scip/snapshots/output/request_goofiness/goofy.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@
55
# ^^^^^^^^ reference requests 2.0.0 requests/__init__:
66

77
print(requests.get("https://sourcegraph.com"))
8-
#^^^^ reference python-stdlib 3.10 builtins/__init__:print().
8+
#^^^^ reference python-stdlib 3.11 builtins/__init__:print().
99
#external documentation ```python
10-
# > (function)
11-
# > print(*values: object, sep: str | None =...
12-
# >
13-
# > print(*values: object, sep: str | None =...
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
1417
# > ```
1518
# ^^^^^^^^ reference requests 2.0.0 requests/__init__:
1619
# ^^^ reference requests 2.0.0 `requests.api`/get().

0 commit comments

Comments
 (0)
0