-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathsingle_function.py
More file actions
36 lines (31 loc) · 1.76 KB
/
single_function.py
File metadata and controls
36 lines (31 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# < definition scip-python python snapshot-util 0.1 `src.single_function`/__init__:
def my_cool_function(a: str) -> str:
# ^^^^^^^^^^^^^^^^ definition snapshot-util 0.1 `src.single_function`/my_cool_function().
# ^ definition snapshot-util 0.1 `src.single_function`/my_cool_function().(a)
# ^^^ reference python-stdlib 3.11 builtins/str#
# ^^^ reference python-stdlib 3.11 builtins/str#
x = ", world"
# ^ definition local 0
return a + x
# ^ reference snapshot-util 0.1 `src.single_function`/my_cool_function().(a)
# ^ reference local 0
def my_cool_function_2(a: str):
# ^^^^^^^^^^^^^^^^^^ definition snapshot-util 0.1 `src.single_function`/my_cool_function_2().
# ^ definition snapshot-util 0.1 `src.single_function`/my_cool_function_2().(a)
# ^^^ reference python-stdlib 3.11 builtins/str#
x = ", world"
# ^ definition local 1
return (lambda y: a + x + y)("oh no")
# ^ definition local 3
# ^ reference snapshot-util 0.1 `src.single_function`/my_cool_function_2().(a)
# ^ reference local 1
# ^ reference local 3
def next_level():
# ^^^^^^^^^^ definition snapshot-util 0.1 `src.single_function`/next_level().
return my_cool_function
# ^^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.single_function`/my_cool_function().
my_cool_function("hello")
#^^^^^^^^^^^^^^^ reference snapshot-util 0.1 `src.single_function`/my_cool_function().
next_level()(a = "wow")
#^^^^^^^^^ reference snapshot-util 0.1 `src.single_function`/next_level().
# ^ reference snapshot-util 0.1 `src.single_function`/my_cool_function().(a)