Skip to content

Commit fd72c98

Browse files
committed
correct passing the wrong argument set to block in Timer.time_it
1 parent 97ec751 commit fd72c98

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ timer = Timer()
107107
```python
108108
@timer.decorate(runs=5, log_arguments=True, call_callable_args=True)
109109
def bubble_sort(array):
110-
# print(len(array))
111-
112110
while True:
113111
switched = False
114112
for i in range(0, len(array)-1):

exectiming/exectiming.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ def time_it(self, block: Union[str, callable], *args, runs=1, iterations_per_run
853853
st = StaticTimer._time()
854854
for _ in range(iterations_per_run):
855855
if callable(block):
856-
value = block(*args, **kwargs)
856+
value = block(*new_args, **new_kwargs)
857857
else:
858858
value = eval(block, globals, locals)
859859

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
setuptools.setup(
2323
name="exectiming",
24-
version="2.0.0rc2",
24+
version="2.0.0rc3",
2525
author="Jacob Morris",
2626
author_email="blendingjake@gmail.com",
2727
description="A Python package for measuring the execution time of code",

0 commit comments

Comments
 (0)