Skip to content

chore: Update snapshots #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# format-options: showDocs

import re
from typing import Callable, Optional

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# format-options: showDocs

class Example:
# Note, only y has a type hint
y: int
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# format-options: showDocs

class ClassWithField:

a: int
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# format-options: showDocs

class ClassWithInferredField:
def __init__(self, b: int):
self.b = b
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# format-options: showDocs

"""
This is a docstring for this module
"""
Expand Down
13 changes: 0 additions & 13 deletions packages/pyright-scip/snapshots/output/aliased_import/actual.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
# < definition scip-python python snapshot-util 0.1 actual/__init__:
#documentation (module) actual

import aliased
# ^^^^^^^ reference snapshot-util 0.1 aliased/__init__:
import aliased as A
# ^^^^^^^ reference snapshot-util 0.1 aliased/__init__:
# ^ reference local 0
# documentation ```python
# > (module) A
# > ```

print(A.SOME_CONSTANT)
#^^^^ reference python-stdlib 3.11 builtins/print().
#external documentation ```python
# > (function) def print(
# > *values: object,
# > sep: str | None = " ",
# > end: str | None = "\n",
# > file: SupportsWrite[str] | None = No...
# > flush: Literal[False] = False
# > ) -> None
# > ```
# ^ reference local 0
# ^^^^^^^^^^^^^ reference snapshot-util 0.1 aliased/SOME_CONSTANT.

Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# < definition scip-python python snapshot-util 0.1 aliased/__init__:
#documentation (module) aliased

SOME_CONSTANT = "Some Constant"
#^^^^^^^^^^^^ definition snapshot-util 0.1 aliased/SOME_CONSTANT.
#documentation ```python
# > builtins.str
# > ```

Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# < definition scip-python python snapshot-util 0.1 builtin_imports/__init__:
#documentation (module) builtin_imports

# format-options: showDocs

import re
# ^^ reference python-stdlib 3.11 re/__init__:
from typing import Callable, Optional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# < definition scip-python python snapshot-util 0.1 class_nohint/__init__:
#documentation (module) class_nohint

# format-options: showDocs

class Example:
# ^^^^^^^ definition snapshot-util 0.1 class_nohint/Example#
# documentation ```python
# > class Example:
# > ```
# ^^^^^^^ definition snapshot-util 0.1 class_nohint/Example#
# Note, only y has a type hint
y: int
# ^ definition snapshot-util 0.1 class_nohint/Example#y.
Expand Down
48 changes: 0 additions & 48 deletions packages/pyright-scip/snapshots/output/comprehensions/comp.py
Original file line number Diff line number Diff line change
@@ -1,90 +1,42 @@
# < definition scip-python python snapshot-util 0.1 comp/__init__:
#documentation (module) comp

def something(x):
# ^^^^^^^^^ definition snapshot-util 0.1 comp/something().
# documentation ```python
# > def something(
# > x
# > ):
# > ```
# ^ definition snapshot-util 0.1 comp/something().(x)
return 2 * x
# ^ reference snapshot-util 0.1 comp/something().(x)

_ = [x for x in "should be local 0"]
# ^ reference local 0
# ^ definition local 0
# documentation ```python
# > (variable) x: str
# > ```
_ = [something(x) for x in "should be local 1"]
# ^^^^^^^^^ reference snapshot-util 0.1 comp/something().
# ^ reference local 1
# ^ definition local 1
# documentation ```python
# > (variable) x: str
# > ```
_ = [something(x) for x in "should be local 2" if x == "s"]
# ^^^^^^^^^ reference snapshot-util 0.1 comp/something().
# ^ reference local 2
# ^ definition local 2
# documentation ```python
# > (variable) x: str
# > ```
# ^ reference local 2
_ = {k: x for (k, x) in enumerate(range(10))}
# ^ reference local 3
# ^ reference local 4
# ^ definition local 3
# documentation ```python
# > (variable) k: int
# > ```
# ^ definition local 4
# documentation ```python
# > (variable) x: int
# > ```
# ^^^^^^^^^ reference python-stdlib 3.11 builtins/enumerate#
# external documentation ```python
# > class enumerate(
# > iterable: Iterable[int],
# > start: int = ...
# > )
# > ```
# ^^^^^ reference python-stdlib 3.11 builtins/range#
# external documentation ```python
# > class range(
# > __stop: SupportsIndex,
# > /
# > )
# > ```


asdf = (var for var in [1, 2, 3] if var % 2 == 0)
#^^^ definition snapshot-util 0.1 comp/asdf.
#documentation ```python
# > typing.Generator
# > ```
# ^^^ reference local 5
# ^^^ definition local 5
# documentation ```python
# > (variable) var: int
# > ```
# ^^^ reference local 5
for var in asdf:
# ^^^ definition snapshot-util 0.1 comp/var.
# ^^^^ reference snapshot-util 0.1 comp/asdf.
print(var)
# ^^^^^ reference python-stdlib 3.11 builtins/print().
# external documentation ```python
# > (function) def print(
# > *values: object,
# > sep: str | None = " ",
# > end: str | None = "\n",
# > file: SupportsWrite[str] | None = No...
# > flush: Literal[False] = False
# > ) -> None
# > ```
# ^^^ reference snapshot-util 0.1 comp/var.

# TODO: ListComprehensions with if
Expand Down
13 changes: 0 additions & 13 deletions packages/pyright-scip/snapshots/output/dunder_vars/__main__.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
# < definition scip-python python snapshot-util 0.1 __main__/__init__:
#documentation (module) __main__


if __name__ == '__main__':
# ^^^^^^^^ reference python-stdlib 3.11 builtins/__name__#
# external documentation ```python
# > __name__: str
# > ```
print("main")
# ^^^^^ reference python-stdlib 3.11 builtins/print().
# external documentation ```python
# > (function) def print(
# > *values: object,
# > sep: str | None = " ",
# > end: str | None = "\n",
# > file: SupportsWrite[str] | None = No...
# > flush: Literal[False] = False
# > ) -> None
# > ```


Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# < definition scip-python python . . main/__init__:
#documentation (module) main

def main():
# ^^^^ definition . . main/main().
# documentation ```python
# > def main(): # -> None:
# > ```
pass

main()
Expand Down
13 changes: 0 additions & 13 deletions packages/pyright-scip/snapshots/output/f_string/fstring.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
# < definition scip-python python snapshot-util 0.1 fstring/__init__:
#documentation (module) fstring

var = ", world!"
#^^ definition snapshot-util 0.1 fstring/var.
#documentation ```python
# > builtins.str
# > ```

print(f"var: hello {var}")
#^^^^ reference python-stdlib 3.11 builtins/print().
#external documentation ```python
# > (function) def print(
# > *values: object,
# > sep: str | None = " ",
# > end: str | None = "\n",
# > file: SupportsWrite[str] | None = No...
# > flush: Literal[False] = False
# > ) -> None
# > ```
# ^^^ reference snapshot-util 0.1 fstring/var.

Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
# < definition scip-python python snapshot-util 0.1 `abc.file`/__init__:
#documentation (module) abc.file

from xyz import nested_file
# ^^^ reference snapshot-util 0.1 xyz/__init__:
# ^^^^^^^^^^^ reference snapshot-util 0.1 `xyz.nested_file`/__init__:

print(nested_file.X)
#^^^^ reference python-stdlib 3.11 builtins/print().
#external documentation ```python
# > (function) def print(
# > *values: object,
# > sep: str | None = " ",
# > end: str | None = "\n",
# > file: SupportsWrite[str] | None = No...
# > flush: Literal[False] = False
# > ) -> None
# > ```
# ^^^^^^^^^^^ reference snapshot-util 0.1 `xyz.nested_file`/__init__:
# ^ reference snapshot-util 0.1 `xyz.nested_file`/X.

Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
# < definition scip-python python snapshot-util 0.1 file_from_module/__init__:
#documentation (module) file_from_module

from xyz import nested_file
# ^^^ reference snapshot-util 0.1 xyz/__init__:
# ^^^^^^^^^^^ reference snapshot-util 0.1 `xyz.nested_file`/__init__:

print(nested_file.X)
#^^^^ reference python-stdlib 3.11 builtins/print().
#external documentation ```python
# > (function) def print(
# > *values: object,
# > sep: str | None = " ",
# > end: str | None = "\n",
# > file: SupportsWrite[str] | None = No...
# > flush: Literal[False] = False
# > ) -> None
# > ```
# ^^^^^^^^^^^ reference snapshot-util 0.1 `xyz.nested_file`/__init__:
# ^ reference snapshot-util 0.1 `xyz.nested_file`/X.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# < definition scip-python python snapshot-util 0.1 xyz/__init__:
#documentation (module) xyz


Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# < definition scip-python python snapshot-util 0.1 `xyz.nested_file`/__init__:
#documentation (module) xyz.nested_file

X = "a constant"
# definition snapshot-util 0.1 `xyz.nested_file`/X.
#documentation ```python
# > builtins.str
# > ```

Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
# < definition scip-python python snapshot-util 0.1 nameparts/__init__:
#documentation (module) nameparts

import importlib.resources
# ^^^^^^^^^^^^^^^^^^^ reference python-stdlib 3.11 `importlib.resources`/__init__:

importlib.resources.read_text('pre_commit.resources', 'filename')
#^^^^^^^^^^^^^^^^^^ reference python-stdlib 3.11 `importlib.resources`/__init__:
# ^^^^^^^^^ reference local 0
# documentation ```python
# > def read_text(
# > package: Package,
# > resource: Resource,
# > encoding: str = "utf-8",
# > errors: str = "strict"
# > ) -> str:
# > ```
importlib.resources.read_text('pre_commit.resources', 'filename')
#^^^^^^^^ reference python-stdlib 3.11 `importlib.resources`/__init__:
# ^^^^^^^^^ reference local 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# < definition scip-python python snapshot-util 0.1 src/__init__:
#documentation (module) src


Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# < definition scip-python python snapshot-util 0.1 `src.foo`/__init__:
#documentation (module) src.foo


Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
# < definition scip-python python snapshot-util 0.1 `src.foo.bar`/__init__:
#documentation (module) src.foo.bar

class InitClass:
# ^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar`/InitClass#
# documentation ```python
# > class InitClass:
# > ```
# ^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar`/InitClass#
init_item = 10
# ^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar`/InitClass#init_item.
# documentation ```python
# > builtins.int
# > ```

Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
# < definition scip-python python snapshot-util 0.1 `src.foo.bar.baz.mod`/__init__:
#documentation (module) src.foo.bar.baz.mod

class SuchNestedMuchWow:
# ^^^^^^^^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#
# documentation ```python
# > class SuchNestedMuchWow:
# > ```
# ^^^^^^^^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#
class_item: int = 42
# ^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/SuchNestedMuchWow#class_item.
# documentation ```python
# > (variable) class_item: Literal[42]
# > ```
# ^^^ reference python-stdlib 3.11 builtins/int#
# external documentation ```python
# > (class) int
# > ```

class AnotherNestedMuchWow:
# ^^^^^^^^^^^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#
# documentation ```python
# > class AnotherNestedMuchWow:
# > ```
# ^^^^^^^^^^^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#
other_item: int = 42
# ^^^^^^^^^^ definition snapshot-util 0.1 `src.foo.bar.baz.mod`/AnotherNestedMuchWow#other_item.
# documentation ```python
# > (variable) other_item: Literal[42]
# > ```
# ^^^ reference python-stdlib 3.11 builtins/int#

Loading