Skip to content

Commit

Permalink
Fix: Remove function implementations to force return type to be check…
Browse files Browse the repository at this point in the history
…ed. (#120)
  • Loading branch information
stewartHutchins authored Sep 20, 2024
1 parent be05f00 commit 01c4a77
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion challenges/intermediate-generic/question.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


def add(a, b):
return a
...


## End of your code ##
Expand Down
4 changes: 2 additions & 2 deletions challenges/intermediate-generic/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
#
#
# def add(a: T, b: T) -> T:
# return a
# ...


# For Python >= 3.12
def add[T](a: T, b: T) -> T:
return a
...


## End of your code ##
Expand Down
2 changes: 1 addition & 1 deletion challenges/intermediate-generic2/question.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def add(a, b):
return a
...


## End of your code ##
Expand Down
4 changes: 2 additions & 2 deletions challenges/intermediate-generic2/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
#
#
# def add(a: T, b: T) -> T:
# return a
# ...


# For Python >= 3.12
def add[T: (str, int)](a: T, b: T) -> T:
return a
...


## End of your code ##
Expand Down
2 changes: 1 addition & 1 deletion challenges/intermediate-generic3/question.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def add(a):
return a
...


## End of your code ##
Expand Down
4 changes: 2 additions & 2 deletions challenges/intermediate-generic3/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
#
#
# def add(a: T) -> T:
# return a
# ...


# For Python >= 3.12
def add[T: int](a: T) -> T:
return a
...


## End of your code ##
Expand Down

0 comments on commit 01c4a77

Please sign in to comment.