pyKY040 icon indicating copy to clipboard operation
pyKY040 copied to clipboard

Add initial position value

Open Bcow7 opened this issue 5 years ago • 3 comments

Bcow7 avatar Feb 06 '20 10:02 Bcow7

Thanks for the PR @Bcow7!

Is there a reason you got rid of this line ? If you don't use initial_pos then you still would want it to be set to a default.

raphaelyancey avatar Feb 06 '20 11:02 raphaelyancey

You are right. I missed the default value

Bcow7 avatar Feb 10 '20 11:02 Bcow7

My bad, that's on me — self.counter is initialized to 0 at the instanciation. So you were right, you can get rid of the line.

Since your first commit I've added tests. Could you add a few lines for this new param? Also we need to assert self.initial_pos >= self.min_counter and self.initial_pos <= self.max_counter in the lib, and your test would check that it is enforced. You can create a new test function I think, because anyway I need to add tests for all those type assertions.

If you don't have time for this I'll do it, just tell me! Sorry for those back-and-forth I'm kind of new to managing PRs ;)

raphaelyancey avatar Feb 11 '20 23:02 raphaelyancey