We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a2e6c0 commit 820f480Copy full SHA for 820f480
unpythonic/tests/test_dispatch.py
@@ -42,8 +42,11 @@ def _example_impl(start, step, stop): # no @generic!
42
43
# shorter, same effect
44
@generic
45
-def example2(start: int, stop: int):
46
- return example2(start, 1, stop) # just call the method that has the implementation
+def example2(stop: int):
+ return example2(0, 1, stop) # just call the method that has the implementation
47
+@generic
48
+def example2(start: int, stop: int): # noqa: F811
49
+ return example2(start, 1, stop)
50
51
def example2(start: int, step: int, stop: int): # noqa: F811
52
return start, step, stop
@@ -92,6 +95,7 @@ def runtests():
92
95
test[example(2, 10) == (2, 1, 10)]
93
96
test[example(2, 3, 10) == (2, 3, 10)]
94
97
98
+ test[example2(5) == (0, 1, 5)]
99
test[example2(1, 5) == (1, 1, 5)]
100
test[example2(1, 1, 5) == (1, 1, 5)]
101
test[example2(1, 2, 5) == (1, 2, 5)]
0 commit comments