diff options
Diffstat (limited to 'puzzles')
-rw-r--r-- | puzzles/00_assign_wrong_type.py (renamed from puzzles/easy.py) | 0 | ||||
-rw-r--r-- | puzzles/01_assign_reassign.py (renamed from puzzles/easy_reassign.py) | 0 | ||||
-rw-r--r-- | puzzles/02_append.py (renamed from puzzles/infer_append.py) | 0 | ||||
-rw-r--r-- | puzzles/03_assign_wrong_type_in_func.py | 2 | ||||
-rw-r--r-- | puzzles/10_infer_return_type.py | 3 | ||||
-rw-r--r-- | puzzles/20_enum_in_literal.py (renamed from puzzles/tricky_enum.py) | 0 | ||||
-rw-r--r-- | puzzles/30_try_except_finally.py (renamed from puzzles/tricky_try_except.py) | 0 | ||||
-rw-r--r-- | puzzles/40_recursive_types.py (renamed from puzzles/tricky_recursive.py) | 0 | ||||
-rw-r--r-- | puzzles/50_typevar_constrained.py (renamed from puzzles/tricky_typevar_constrained.py) | 0 | ||||
-rw-r--r-- | puzzles/infer_return_basic.py | 3 |
10 files changed, 5 insertions, 3 deletions
diff --git a/puzzles/easy.py b/puzzles/00_assign_wrong_type.py index 6298e46..6298e46 100644 --- a/puzzles/easy.py +++ b/puzzles/00_assign_wrong_type.py diff --git a/puzzles/easy_reassign.py b/puzzles/01_assign_reassign.py index aeed688..aeed688 100644 --- a/puzzles/easy_reassign.py +++ b/puzzles/01_assign_reassign.py diff --git a/puzzles/infer_append.py b/puzzles/02_append.py index 3511512..3511512 100644 --- a/puzzles/infer_append.py +++ b/puzzles/02_append.py diff --git a/puzzles/03_assign_wrong_type_in_func.py b/puzzles/03_assign_wrong_type_in_func.py new file mode 100644 index 0000000..6c87c71 --- /dev/null +++ b/puzzles/03_assign_wrong_type_in_func.py @@ -0,0 +1,2 @@ +def f(): + x: int = 'Python' # error diff --git a/puzzles/10_infer_return_type.py b/puzzles/10_infer_return_type.py new file mode 100644 index 0000000..2776442 --- /dev/null +++ b/puzzles/10_infer_return_type.py @@ -0,0 +1,3 @@ +def f(): return "Python" + +f() + 3 # error diff --git a/puzzles/tricky_enum.py b/puzzles/20_enum_in_literal.py index a743168..a743168 100644 --- a/puzzles/tricky_enum.py +++ b/puzzles/20_enum_in_literal.py diff --git a/puzzles/tricky_try_except.py b/puzzles/30_try_except_finally.py index d63ab10..d63ab10 100644 --- a/puzzles/tricky_try_except.py +++ b/puzzles/30_try_except_finally.py diff --git a/puzzles/tricky_recursive.py b/puzzles/40_recursive_types.py index 5de796c..5de796c 100644 --- a/puzzles/tricky_recursive.py +++ b/puzzles/40_recursive_types.py diff --git a/puzzles/tricky_typevar_constrained.py b/puzzles/50_typevar_constrained.py index 50ce10a..50ce10a 100644 --- a/puzzles/tricky_typevar_constrained.py +++ b/puzzles/50_typevar_constrained.py diff --git a/puzzles/infer_return_basic.py b/puzzles/infer_return_basic.py deleted file mode 100644 index c2cbe7a..0000000 --- a/puzzles/infer_return_basic.py +++ /dev/null @@ -1,3 +0,0 @@ -def f(): return "Python" - -def g(): return f() + 3 # error |